Skip to content

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

@bkmeneguello

Description

@bkmeneguello

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions