tildeio / htmlbars

A variant of Handlebars that emits DOM and allows you to write helpers that manipulate live DOM nodes
MIT License
1.61k stars 193 forks source link

test to show that stripping whitespace after comments is possible #424

Closed raycohen closed 8 years ago

raycohen commented 8 years ago

Adding {{!~}} to the end of a line in a htmlbars template file allows suppressing whitespace between that comment and the first non-whitespace character on the next line.

In my case this is useful when converting templates created in emblem (which by default suppresses whitespace) to htmlbars, without needing to manually squish all the dom tags together.

This behavior wasn't documented or tested anywhere. Hence this PR.

related: https://github.com/tildeio/htmlbars/issues/305

mmun commented 8 years ago

Thanks.