9elements/haml-coffee — pull request #8 by netzpirat (2011-11-21 12:38:44+00:00)
Title: Do not perform boolean attribute logic on String literals.

Currently the boolean attribute logic is performed on String literals, which is wrong:

%input{ checked: 'true' }

will be rendered with the HTML5 format to:

and for the other formats to:

But the logic should only be performed for code attributes and not for String literals:

%input{ checked: true }

There are valid cases where you want to have 'true' as attribute value, for example within data attributes.

There's still a difference to Ruby HAML, because the boolean attribute logic is only performed at compilation time and not render time. I decided against implementing it at render time, because it would make the compiled template more complex, larger and slower.