It can be useful to close blocks using comments. It would also cause major backwards-compatibility problems to change the semantics now.
On Wed, Nov 23, 2011 at 11:58 AM, Duncan Beevers <dun...@dweebd.com> wrote: > I don't see why the indentation-level of -# lines is considered at all. I > vote to remove whitespace significance before haml-comments. > > > On Wed, Nov 23, 2011 at 1:05 PM, Nathan Weizenbaum <nex...@gmail.com>wrote: > >> This is expected; since the second comment is indented less than the if >> block, it closes it, making the "else" a syntax error. >> >> >> On Mon, Nov 21, 2011 at 9:25 PM, Lorin Tackett >> <lorin.tack...@gmail.com>wrote: >> >>> Consider the following Haml: https://gist.github.com/1384945 >>> >>> This generates an error because a comment is in between IF and ELSIF, >>> and Haml proceeds to freak out. >>> >>> SyntaxError at / >>> /Users/ltackett/projects/lorintackett/tests/haml_comment_conditions/source/layout.haml:8: >>> syntax error, unexpected keyword_elsif, expecting keyword_end elsif >>> test_var == 42 ^ >>> /Users/ltackett/projects/lorintackett/tests/haml_comment_conditions/source/layout.haml:12: >>> syntax error, unexpected keyword_ensure, expecting $end >>> >>> It generates an error no matter if I use loud comments or silent >>> comments. This is pretty annoying. >>> >>> Tested with Haml 3.1.2. >>> >>> -- >>> Lorin Tackett >>> Browser Wrangler >>> http://lorintackett.com >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Haml" group. >>> To post to this group, send email to haml@googlegroups.com. >>> To unsubscribe from this group, send email to >>> haml+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/haml?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Haml" group. >> To post to this group, send email to haml@googlegroups.com. >> To unsubscribe from this group, send email to >> haml+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/haml?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Haml" group. > To post to this group, send email to haml@googlegroups.com. > To unsubscribe from this group, send email to > haml+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/haml?hl=en. > -- You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to haml@googlegroups.com. To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/haml?hl=en.