mustache.java
mustache.java copied to clipboard
blanks eventually not rendered
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
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.
Thank you for the response! Best regards!