diff options
author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-03-08 17:54:44 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2023-03-09 11:07:04 +0100 |
commit | c795edfd8de5b77f27ad6c8a25568213dcc09bb6 (patch) | |
tree | 99d0e34ba7f2ed90e823c383d4a03c10eea022d9 | |
parent | 077ba18bf95832e042157db6284d50460f56ab3e (diff) | |
download | askama-c795edfd8de5b77f27ad6c8a25568213dcc09bb6.tar.gz askama-c795edfd8de5b77f27ad6c8a25568213dcc09bb6.tar.bz2 askama-c795edfd8de5b77f27ad6c8a25568213dcc09bb6.zip |
Add documentation for + sign in whitespace control
Diffstat (limited to '')
-rw-r--r-- | book/src/template_syntax.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/book/src/template_syntax.md b/book/src/template_syntax.md index d270800..5e69bc9 100644 --- a/book/src/template_syntax.md +++ b/book/src/template_syntax.md @@ -87,6 +87,18 @@ This discards all whitespace inside the if/else block. If a literal includes only whitespace, whitespace suppression on either side will completely suppress that literal content. +If the whitespace default control is set to "suppress" and you want +to keep whitespace characters on one side of a block or of an +expression, you need to use `+`. Example: + +```text +<a href="/" {#+ #} + class="something">text</a> +``` + +In the above example, it allows to keep one whitespace character +between the `href` and the `class` attributes. + ## Template inheritance Template inheritance allows you to build a base template with common |