]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Make ease of use update to template documentation
authorratchek <git@ratchek.com>
Wed, 13 Dec 2023 01:43:36 +0000 (20:43 -0500)
committerDavid Lord <davidism@gmail.com>
Fri, 20 Dec 2024 16:19:26 +0000 (08:19 -0800)
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.

docs/templates.rst

index d5f2719e079fde79dda2b5747d68a708c5835c1a..758ba90ce55166a6b5f701861b0b4af0191ca97d 100644 (file)
@@ -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::