stencilproject / Stencil

Stencil is a simple and powerful template language for Swift.
https://stencil.fuller.li
BSD 2-Clause "Simplified" License
2.33k stars 221 forks source link

Fix lexer range calculation for tokens #252

Closed djbe closed 5 years ago

djbe commented 5 years ago

There's a bug where tokens without spaces such as {{Test}} are being parsed as Tes.

This PR fixes that issue, and adds a test to ensure this doesn't happen again.

yonaskolb commented 5 years ago

Was that a regression? Do we need a hotfix?

djbe commented 5 years ago

This was a regression, yes. Unfortunately our tests didn't catch this before the 0.13 release.I've already made a 0.13.1 release, so no worries.

I meant to do a release PR, but I accidentally pushed on master and we're not allowed to rebase, so 🤷‍♂️