google / escapevelocity

A subset reimplementation of Apache Velocity with a much simpler API.
Apache License 2.0
33 stars 11 forks source link

Fix a minor incompatibility in `#set` space handling. #35

Closed copybara-service[bot] closed 1 year ago

copybara-service[bot] commented 1 year ago

Fix a minor incompatibility in #set space handling.

Velocity has very particular logic concerning spaces before #set directives. We mimic that very closely, but there was a bug. If the space occurred at the start of a span of nodes and the #set just after it, we didn't delete the space. This could happen at the very start of the template or just inside a #foreach etc.

RELNOTES=A minor incompatibility concerning spaces before #set has been fixed.