mustache.java icon indicating copy to clipboard operation
mustache.java copied to clipboard

blanks eventually not rendered

Open maassg opened this issue 5 years ago • 2 comments

mustache version = 0.9.6

template = "{{#IF}} {{/IF}}]X";

IF=true or IF=false Output is always: ]X

expected: IF=true ]X IF=false ]X

template = "X[{{#IF}} {{/IF}}]X"; works as expected!

IF=true x[ ]X IF=false x[]X

maassg avatar Jun 25 '19 11:06 maassg

In order to make nice looking HTML output mustache.java doesn't consider whitespace by itself significant. We've talked about changing this behavior but a big change in it wouldn't be backwards compatible. I'm still thinking about changing it but it isn't a very high priority since there are generally workarounds if you absolutely have to have it. I'll leave this open though until eventually some final decision is made on it.

spullara avatar Jun 25 '19 18:06 spullara

Thank you for the response! Best regards!

maassg avatar Jun 26 '19 12:06 maassg