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

Ensure column is reset when incrementing right stripped lines. #451

Closed rwjblue closed 8 years ago

rwjblue commented 8 years ago

https://github.com/tildeio/htmlbars/pull/450 initially intended to fix this, but while adding more examples to the test scenarios I zeroed in on another bug (that was ultimately wider spread than this one).

When a closing block tag is followed by a newline, that newline is stripped. We were properly handling the line being stripped, but not resetting the column when we incremented the line.

This ensures that the column is reset to 0 if the lines are incremented.