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
+49
−3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ThiefMaster
force-pushed
the
set-block-filters
branch
2 times, most recently
from
September 11, 2015 22:32
028db2d
to
14cdc77
Compare
ThiefMaster
force-pushed
the
set-block-filters
branch
4 times, most recently
from
January 7, 2017 15:20
e2da2f1
to
8158949
Compare
mitsuhiko
reviewed
Jan 7, 2017
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.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
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.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
ThiefMaster
force-pushed
the
set-block-filters
branch
2 times, most recently
from
January 9, 2017 15:47
1a72eac
to
e3f7993
Compare
ThiefMaster
force-pushed
the
set-block-filters
branch
from
April 5, 2017 18:31
e3f7993
to
6b66942
Compare
ThiefMaster
force-pushed
the
set-block-filters
branch
from
June 24, 2017 09:02
6b66942
to
0849f32
Compare
ThiefMaster
force-pushed
the
set-block-filters
branch
2 times, most recently
from
August 22, 2017 21:25
e59142e
to
c292e5f
Compare
mitsuhiko
approved these changes
Oct 31, 2017
ThiefMaster
force-pushed
the
set-block-filters
branch
from
October 31, 2017 21:54
c292e5f
to
e77f88b
Compare
- e.g {% set foo | trim %}...{% endset %} - closes pallets#486
ThiefMaster
force-pushed
the
set-block-filters
branch
from
October 31, 2017 22:05
e77f88b
to
072cdf9
Compare
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As suggested in #486, this adds support for filters in
set
blocks: