Sorry to jump in the wayback machine, but this is a hard problem to google for and this thread was the only hit I've got so far: http://groups.google.com/group/haml/browse_thread/thread/dbcc90fd32270a34?fwc=2
I'm still having this "empty line after line continuation operator" problem in 2.0.9, so I guess it leaked into master at some point? Anyone know if this is on anyone's radar (or can you point me to the general area I should be looking in to fix it)? Many thanks! -Joshua Emmons On Oct 2 2008, 11:42 pm, Nathan Weizenbaum <[email protected]> wrote: > After looking into this further, I've realized that this issue doesn't > appear in the master branch. Since it's easy to work around it in > stable, I don't think I'm going to bother tracking it down further. > > Dave Rothlisberger wrote: > > Oops, yes I missed the | at the end of the last line. Thanks for > > taking the time to reply; however the | is not exactly related to the > > problem at hand. > > > I have narrowed narrowed it down. The following haml template gives > > the error "Syntax error on line 6: 4 spaces were used for indentation. > > Haml must be indented using two spaces.": > > > %div > > %div > > = "blah blah blah blah blah " + | > > "blah blah blah." | > > > = "blah" > > > If I remove the blank line between the two "=" statements, it compiles > > fine. > > > If the statement above the blank line isn't a multiline statement, it > > compiles fine. > > > If I add 4 spaces to the blank line (to match the indentation of the > > other lines, even though other than whitespace there is nothing on > > that line) it compiles fine. > > > I'm using haml 2.0.3, ruby 1.8.7-p22, and rails 2-1-stable. > > > Cheers, > > Dave. > > > On Sep 28, 4:31 pm, Nathan Weizenbaum <[email protected]> wrote: > > >> The problem is caused by the multiline syntax. Haml multiline syntax > >> requires the | to be used at the end of *each* line in the multiline > >> block. So you should do > > >> stuff > >> stuff > >> = blah blah blah blah blah | > >> blah blah blah blah | > > >> = blah > > >> See question three > >> ofhttp://haml.hamptoncatlin.com/docs/rdoc/files/FAQ.html. > > >> Dave Rothlisberger wrote: > > >>> I have seen this error when you have blank lines in the template. I > >>> can't remember the details, it may have had to do with multi-line > >>> content (with the dreaded "|" line-joining syntax). > > >>> e.g. something like > > >>> stuff > >>> stuff > >>> = blah blah blah blah blah | > >>> blah blah blah blah > > >>> = blah > > >>> Haml seemed to think the second "= blah" line was indented too far, > >>> when in fact it was matching the previous indentation. Removing the > >>> blank line fixed the problem for me. > > >>> Again, I can't remember the exact details so I don't have a working > >>> test case for this. Are blank lines allowed or discouraged in haml? > > >>> Cheers > >>> Dave. > > >>> On Sep 17, 11:01 am, Chris Eppstein <[email protected]> wrote: > > >>>> ActionView::TemplateError (4 spaces were used for indentation. Haml > >>>> must be indented using exactly *two* spaces. Please go to line 7 of > >>>> foo.sass, > >>>> place the cursor before the first non-space character and press the > >>>> backspace key 2 times. Then save the file.) > > >>>> ;-) > > >>>> On Sep 17, 8:35 am, Nathan Weizenbaum <[email protected]> wrote: > > >>>>> I'm not sure if I can be more clear than the error itself... Haml > >>>>> requires two spaces for indentation. You used more than two spaces. > > >>>>> venkat wrote: > > >>>>>> ActionView::TemplateError (4 spaces were used for indentation. Haml > >>>>>> must be indented using two spaces.) > > >>>>>> Thanks in advance > > >>>>>> -venkat --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
