Also, if you prefer...
%p= "I went to the #{shops}, so I crossed the road"
just for some classic Ruby.
Haml is a bit hackish on these parts, because Haml is for designed
structure. And it can do inline. Where, erb/rhtml was built for
printing out files with some data. So, naturally Rhtml solves that
in-line code a bit cleaner. But, I'd personally take a *few* ugly
inline instances in trade for clear and usable structure definitions.
-Hampton.
On 2/7/07, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
>
> The Hamlicious way to do this is
>
> %p
> I went to the
> - succeed ',' do
> = shops
> so crossed the road
>
> Note that
>
> %p
> I went to the |
> = "shops" |
> , so crossed the road |
>
> doesn't actually work... the multiline operator, "|", causes Haml to
> parse everything as though it were one line. Thus, it reads that as
>
> %p
> I went to the = "shops" , so crossed the road
>
> and outputs
>
> <p>I went to the = "shops" , so crossed the road</p>
>
> - Nathan
>
> Chris Abad wrote:
> > %p= "I went to the #{shops}, so crossed the road"
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---