-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Vanishing newlines #457
Comments
Similar issue is with inline partials. {{#*inline "foo"}}foo
{{/inline}}
{{> foo}}
{{> foo}}
{{> foo}} Should render the foos with newlines inbetween (currently that is not the case). |
This reverts commit 7622d05. This is dure to a whitespace parsing issue with hbs 4.x sunng87/handlebars-rust#457
@vojtechkral for case {{~#if condition}}
foo
bar
{{/if}}
baz I cannot reproduce the issue as you described for newline between bar and baz. You can check the commit to see if it matches your scenario. However there is a bug with additional newline added ahead of foo and it's fixed in #458 I will be digging into your second case soon |
@vojtechkral could you help to verify it's handlebars 4.1 on which these issues happened? Changes in #404 could have affected your cases but should have been fixed in 4.1 with #448 . Although I managed to fix some corner cases in #458 but none of them are related to your scenario. |
@sunng87 I'll try |
Hm... however, it looks like the behavior is the same now as in JS handlebars. So, looks like I was relying on nonstandard thing there as well. |
I think the change at #404 might've been too aggressive, given a template like this:
I get no newline betweenbar
andbaz
anymore. I believe there should be one. A workaround is to add a comment right after the closing if, ie.{{/if}}{{!}}
.But for now I think I'll hold the update to 4.x ...
This is probably tricky to solve correctly.
The text was updated successfully, but these errors were encountered: