HAML whitespace
I came across a weird HAML syntax in a client codebase that I was just confused about.
Haml::Engine.new(%q{
- title = '1'
.title== #{title}<br/>
}).to_html
=> <div class='title'>1<br/></div>
I found an alternative syntax, I am not sure I like it but it’s certainly better than the above.
Haml::Engine.new(%q{
- title = '1'
.title<
#{title}
%br>
}).to_html
=> <div class='title'>1<br></div>
Basically you can kill whitespace with < >