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

Support filters in set block #489

Merged
merged 1 commit into from
Oct 31, 2017

Conversation

ThiefMaster
Copy link
Member

As suggested in #486, this adds support for filters in set blocks:

{% set foo | somefilter %}
    this is a test
{% endset %}

@ThiefMaster ThiefMaster force-pushed the set-block-filters branch 2 times, most recently from 028db2d to 14cdc77 Compare September 11, 2015 22:32
@ThiefMaster ThiefMaster force-pushed the set-block-filters branch 4 times, most recently from e2da2f1 to 8158949 Compare January 7, 2017 15:20
@ThiefMaster ThiefMaster requested a review from mitsuhiko January 7, 2017 17:15
CHANGES Outdated
@@ -43,6 +43,7 @@ Version 2.9
- The `with` and `autoescape` tags are now built-in.
- Added the new `select_autoescape` function which helps configuring better
autoescaping easier.
- Added filter support to the block ``set`` tag.

This comment was marked as off-topic.

This comment was marked as off-topic.

self.visit_Filter(node.filter, block_frame)
else:
self.write('concat(%s)' % block_frame.buffer)
self.write(')')

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@ThiefMaster ThiefMaster force-pushed the set-block-filters branch 2 times, most recently from 1a72eac to e3f7993 Compare January 9, 2017 15:47
@ThiefMaster ThiefMaster force-pushed the set-block-filters branch 2 times, most recently from e59142e to c292e5f Compare August 22, 2017 21:25
- e.g {% set foo | trim %}...{% endset %}
- closes pallets#486
@ThiefMaster ThiefMaster merged commit 072cdf9 into pallets:master Oct 31, 2017
@ThiefMaster ThiefMaster deleted the set-block-filters branch October 31, 2017 22:34
wmfgerrit pushed a commit to wikimedia/operations-docker-images-docker-pkg-deploy that referenced this pull request Dec 19, 2017
So we can benefit from filters in set blocks. Example:

    {% set foo | somefilter %}
        this is a test
    {% endset %}

pallets/jinja#489

Change-Id: I2f8833291af3e672494f6bb95a81486f8914e133
@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 this pull request may close these issues.

2 participants