Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blanks eventually not rendered #235

Open
maassg opened this issue Jun 25, 2019 · 2 comments
Open

blanks eventually not rendered #235

maassg opened this issue Jun 25, 2019 · 2 comments

Comments

@maassg
Copy link

maassg commented Jun 25, 2019

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

@spullara
Copy link
Owner

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.

@maassg
Copy link
Author

maassg commented Jun 26, 2019

Thank you for the response!
Best regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants