Skip to content

Commit

Permalink
Make ease of use update to template documentation
Browse files Browse the repository at this point in the history
Add the phrases 'multiline comment' and 'triple quotes' to docs
in the templates/#block-assignments section. This allows for new
users to find this alternative easily.
  • Loading branch information
ratchek authored and davidism committed Dec 20, 2024
1 parent e7cb37d commit d6998ab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1090,9 +1090,10 @@ Block Assignments

Starting with Jinja 2.8, it's possible to also use block assignments to
capture the contents of a block into a variable name. This can be useful
in some situations as an alternative for macros. In that case, instead of
using an equals sign and a value, you just write the variable name and then
everything until ``{% endset %}`` is captured.
in some situations as an alternative for macros. It can also be used to create
multiline strings instead of triple quotes (''' and """), which Jinja does not
support. In that case, instead of using an equals sign and a value, you just
write the variable name and then everything until ``{% endset %}`` is captured.

Example::

Expand Down

0 comments on commit d6998ab

Please sign in to comment.