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.
This commit is contained in:
parent
e7cb37de59
commit
d6998ab74e
@ -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::
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user