It works fine for me. What HTML output are you seeing?
On Sun, Aug 22, 2010 at 4:26 PM, Fernando Espinosa <
[email protected]> wrote:
> Hi!
>
> I'm trying to put an unordered list inside an anchor tag. I'm using a
> html5 doctype, and version 3.0.17 of haml gem.
>
> This code is failing:
>
> %ul
> - @pets.each do |pet|
> %li.pet
> %a{:href => url_for(pet)}
> %ul
> %li.photo
> = image_tag('dog1.jpg')
>
> It renders an empty link tag before the ul, and another link tag
> before the image tag. It does render it well if I put it this way:
>
> %ul
> - @pets.each do |pet|
> %li.pet
> %a{:href => url_for(pet)}
> %span
> %ul
> %li.photo
> = image_tag('dog1.jpg')
>
> But the problem is the resulting html is not w3c valid. If I change
> the %span with a %div tag, it also fails as in the first case.
>
> This is the markup I'm trying to get:
>
> <ul>
> <li class="peet">
> <a href="/pet/1">
> <ul>
> <li class="photo">
> <img src="dog1.jpg" alt="dog" />
> </li>
> </ul>
> </a>
> </li>
> </ul>
>
> Which is w3c valid.
>
> I would appreciate any help :)
>
> Thanks!
>
> --
> 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] <haml%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/haml?hl=en.
>
>
--
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.