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 <[email protected]>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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/haml?hl=en.
