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 of
http://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
-~----------~----~----~----~------~----~------~--~---