Fixed in 34500a1. Thanks for the report.
Dave Rothlisberger wrote:
> Hi
>
> If I have this haml template:
>
> - attrs = {:color => 'red'}
> %div{ attrs } Hello
> %div.special{ attrs } I'm special!
> %div{ attrs } I'm not (at least I shouldn't be)
>
> It renders as:
>
> <div color='red'>Hello</div>
> <div class='special' color='red'>I'm special!</div>
> <div class='special' color='red'>I'm not (at least I shouldn't be)</
> div>
>
> i.e. the last div has class='special' but it shouldn't.
>
> Workaround 1: Make *attrs* be a method that returns a hash, rather
> than a variable.
>
> Workaround 2: %div{ attrs, :class => 'special' } instead of
> %div.special{ attrs }
>
> Still, I think this is a bug that should be fixed (unless the way I
> expect it to work contravenes the "haml way" -- which I am not
> particularly familiar with yet, having known haml for all of 2
> hours). :-)
>
> This is with haml 2.0.3, ruby 1.8.7-p22, rails 2-1-stable.
>
> Cheers
> Dave.
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---