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

Fix right-side inline whitespace trimming #885

Merged
merged 4 commits into from
Jun 27, 2022

Conversation

jasmith-hs
Copy link
Contributor

@jasmith-hs jasmith-hs commented Jun 27, 2022

In 2016 we added whitespace trimming for text nodes and this would strip whitespace after an endtag. However, there are tags such as print, set, and do (and else/elif) that do not have end tags. For these tags, whitespace trimming has been broken compared to how it works in jinja. Right-trimming on these tags did not work.
Now, we will trim properly so:

a{% set x = 0 -%}
b

Will output as ab

@jasmith-hs jasmith-hs requested review from boulter and jmaroeder June 27, 2022 15:06
@jasmith-hs jasmith-hs merged commit 4262011 into master Jun 27, 2022
@jasmith-hs jasmith-hs deleted the inline-whitespace-trimming branch June 27, 2022 18:51
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.

2 participants