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

Allow +%} to ignore trim_blocks like {%+ do for lstrip_blocks #1036

Closed
bkmeneguello opened this issue Jul 19, 2019 · 0 comments · Fixed by #1240
Closed

Allow +%} to ignore trim_blocks like {%+ do for lstrip_blocks #1036

bkmeneguello opened this issue Jul 19, 2019 · 0 comments · Fixed by #1240
Milestone

Comments

@bkmeneguello
Copy link

Expected Behavior

When trim_block is enabled, if a block ends with +%} this behaviour should be ignored.

Actual Behavior

As reported in previous issues, defining a block this way results in an error and to force new lines right after a block it's required to put two line breaks.

Template Code

When trim_blocks is enabled

{% if something %}X{% endif +%}
more things

Should result in:

X
more things

Your Environment

  • Python version: any
  • Jinja version: 2.10.1
@davidism davidism added this to the 3.0.0 milestone Jun 22, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants