Skip to content

Commit d6998ab

Browse files
ratchekdavidism
authored andcommitted
Make ease of use update to template documentation
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.
1 parent e7cb37d commit d6998ab

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/templates.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,9 +1090,10 @@ Block Assignments
10901090

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

10971098
Example::
10981099

0 commit comments

Comments
 (0)