I really don't like the idea of trailing whitespace as a semantically
significant marker. Not only is it invisible, but various editors and
stuff like Google Groups eat it.
Right now, the solution is to use the precede and succeed helpers. For
example:
%div
= succeed '?' do
%a{ :href => '#' } Hmm
Of course, this doesn't encompass all the issues. This is still
something of an unsolved problem; the idea of a helper that does it has
been floated around, though.
- Nathan
Frederick wrote:
> Hypothetically, how would adjacent text nodes be handled? Could we do
> it so that there's no whitespace between a text node and an inline
> tag?
>
> %div
> %a{ :href => "#" } Hmm
> ?
>
> would render
>
> <div>
> <a href="#">Hmm</a>?
> </div>
>
> But if you wanted a space between a text node and an inline tag, you
> could add a space to the end (or the start, if the case is reversed)
> of the text node?
>
> %div
> Look at
> %a{ :href => "#" } this
> !
>
> (Not sure if the space survived there, supposed to go after "Look
> at".)
>
> would render
>
> <div>
> Look at <a href="#">this</a>!
> </div>
>
> Does that seem like a good solution?
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---