Showing posts with label Views. Show all posts
Showing posts with label Views. Show all posts

Monday, April 6, 2015

Removing extra whitespace from Haml

Most of the time, Haml is pretty awesome. One of the cases where it's not so awesome is around multiline mixed Ruby/HTML. For example, when trying to create a timer on the screen:

Because of reasons, Haml decides to add extra whitespace around each of the span tags. Sometimes this is desirable, but sometimes you want to remove the whitespace/extra space around Haml tags. As usual, there is a quick fix, in this case the '>' character: