aboutsummaryrefslogtreecommitdiffstats
path: root/book/src
diff options
context:
space:
mode:
authorLibravatar Guillaume Gomez <guillaume1.gomez@gmail.com>2024-01-22 16:54:56 +0100
committerLibravatar Guillaume Gomez <guillaume1.gomez@gmail.com>2024-01-22 17:13:01 +0100
commitef53238ae2ee77becc44bcb0b77c1c4daceca5af (patch)
tree6fcdb07dd372f8b1580479e35ce89bf9b79275cb /book/src
parent585a992246bf0602bd81b922eee8c7a6d27e9317 (diff)
downloadaskama-ef53238ae2ee77becc44bcb0b77c1c4daceca5af.tar.gz
askama-ef53238ae2ee77becc44bcb0b77c1c4daceca5af.tar.bz2
askama-ef53238ae2ee77becc44bcb0b77c1c4daceca5af.zip
Mention that whitespace control is not allowed on `extends` in the book
Diffstat (limited to '')
-rw-r--r--book/src/template_syntax.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/book/src/template_syntax.md b/book/src/template_syntax.md
index 4bd9894..31b1eaa 100644
--- a/book/src/template_syntax.md
+++ b/book/src/template_syntax.md
@@ -328,6 +328,16 @@ blocks from the base template with those from the child template. Inside
a block in a child template, the `super()` macro can be called to render
the parent block's contents.
+Because top-level content from the child template is thus ignored, the `extends`
+tag doesn't support whitespace control:
+
+```html
+{%- extends "base.html" +%}
+```
+
+The above code is rejected because we used `-` and `+`. For more information
+about whitespace control, take a look [here](#whitespace-control).
+
## HTML escaping
Askama by default escapes variables if it thinks it is rendering HTML