-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Conversation
028db2d
to
14cdc77
Compare
e2da2f1
to
8158949
Compare
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.
1a72eac
to
e3f7993
Compare
e3f7993
to
6b66942
Compare
6b66942
to
0849f32
Compare
e59142e
to
c292e5f
Compare
c292e5f
to
e77f88b
Compare
- e.g {% set foo | trim %}...{% endset %} - closes pallets#486
e77f88b
to
072cdf9
Compare
So we can benefit from filters in set blocks. Example: {% set foo | somefilter %} this is a test {% endset %} pallets/jinja#489 Change-Id: I2f8833291af3e672494f6bb95a81486f8914e133
As suggested in #486, this adds support for filters in
set
blocks: