I was confused by this output when I tried to use jquery-tmpl conditions in the class:
# .a(class="{{if x}}{{/if}}")
Haml::Engine.new('.a(class="{{if x}}{{/if}}")').to_html
#=> "<div class='a x}}{{/if}} {{if'></div>\n"
# %div(class="a {{if x}}{{/if}}")
Haml::Engine.new('%div(class="a {{if x}}{{/if}}")').to_html
#=> "<div class='a {{if x}}{{/if}}'></div>\n"
The current behavior prevents duplicate classes (.foo(class="foo")) but it would be better just to leave the class-attribute order untouched.
I was confused by this output when I tried to use jquery-tmpl conditions in the class:
The current behavior prevents duplicate classes (
.foo(class="foo")) but it would be better just to leave the class-attribute order untouched.