Actually, tags like img that are always self-closed are automatically
self-closed, as of (I believe) Haml 1.5.
- Nathan
Sean Cribbs wrote:
> There are two things wrong with your code, one that %a should not have a
> | at the end of its line if you're nesting an image inside. The second
> is that your %img line should end with a / since it's a singleton tag.
>
> Sean
>
> jallen wrote:
>
>> Hi,
>>
>> I'm new to haml and am learning how to use the pipe directive. I
>> authored this:
>>
>> %a{:href => '#'}|
>> %img{:src => 'foo.gif'}Hi, I want something like this:
>>
>> Expecting something this:
>>
>> <a href="#"><img src="foo.gif"></a>
>>
>> But instead, I am getting this error:
>>
>> "Illegal Nesting: Nesting within a tag that already has content is
>> illegal."
>>
>> Is there no way to get haml to emit nested elements this way? Btw,
>> thanks, haml is fun.
>>
>>
>>
>>
>>
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---