Skip to content

Fix whitespace control for chained blocks #19

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zygzagZ
Copy link

@zygzagZ zygzagZ commented Mar 25, 2025

omitLeft failed for helper ending block in chained inverse. It tried to omitLeft whitespace only for the first inverse, which is incorrect. Failing scenario:

{{#if false}}
{{else if false}}
{{else}}
	{{/if}}

TAB used to make it into the template.
WhitespaceControl failed to omit tab character, while working properly on a bit simpler scenario:

{{#if false}}
{{else}}
	{{/if}}

Here, TAB did not use to make it into the template.

This PR fixes first scenario to also omit tab.

omitLeft failed for helper ending block in chained inverse. It tried to omitLeft whitespace only for the first inverse, which is incorrect.
Failing scenario:
```
{{#if false}}
{{else if false}}
{{else}}
	{{/if}}
```
TAB used to make it into the template.
WhitespaceControl failed to omit tab character, while working properly on a bit simpler scenario:
```
{{#if false}}
{{else}}
	{{/if}}
```
Here, TAB did not use to make it into the template.
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

Successfully merging this pull request may close these issues.

1 participant