Haml whitespace munching

24 views
Skip to first unread message

Russell Allen

unread,
Jan 28, 2012, 6:55:59 PM1/28/12
to Haml
Hi all,

I'm working on the NHaml .Net port of the Haml project (over at
https://github.com/NHaml/NHaml/tree/NHaml4), and I'm struggling with
whitespace munching.

I've got the surrounding-whitespace down easily enough, but the
interior whitespace munching is causing me a few issues.

Is there a reason why the following Haml:

%p<
%p
%p

Is rendered as:

<p><p></p>
<p></p></p>

And not as:

<p><p></p>
<p></p></p>

The current whitespace munching implementation in Haml seems to be
munching more than just the whitespace immediately inside a tag?

Would love to hear thoughts on this and some suggestions how NHaml
should tackle this!

Thanks,

Russ
Reply all
Reply to author
Forward
0 new messages