jknack / handlebars.java

Logic-less and semantic Mustache templates with Java
http://jknack.github.io/handlebars.java
Other
1.47k stars 383 forks source link

Preserving whitespace in response at MissingValueHelper #1122

Open antosarho opened 6 months ago

antosarho commented 6 months ago

I am using the MissingValueHelper, and it's as simple as return options.fn.text();.

This works well, except for the following: {{myvar}}{{ myvar2 }} will output as {{myvar}}{{myvar2}}

I can't find a way to nicely preserve that whitespace.

Would this need to be a new feature? Or is there a way to know if there was whitespace in the original missing value?