How do I trim all whitespace in HAML?
haml, ruby-on-rails, whitespace
Solution
%span.word
%span.w> W
%span.o> O
%span.r> R
%span.d> D
`>` (for whitespaces around a tag) and `<` (for whitespaces inside a tag) are used for whitespace removal.
Problem
In my example I want to individually markup letters in the word "word" ``` %span.word %span.w W %span.o O %span.r R %span.d D ``` As it is, this produces html like ``` <span class="word"> <span class="w">W</span> <span class="o">O</span> <span class="r">R</span> <span class="d">D</span> </span> ``` As you'd expect this displays as W O R D But I want it to display as WORD How can tell haml to remove all whitespace within the `%span.word` block?