diff options
author | Paul McMillan <paul.mcmillan@nebula.com> | 2012-07-04 11:57:37 -0700 |
---|---|---|
committer | Paul McMillan <paul.mcmillan@nebula.com> | 2012-07-04 12:00:12 -0700 |
commit | b4188e0d18d211aed914669de79607fe7bef042b (patch) | |
tree | f69b766c14fce4f4e51bead000416155c721bb7a /docs | |
parent | a21f2edfc9536c918bae0ef654f9f3ffb1c2b508 (diff) | |
download | jinja2-b4188e0d18d211aed914669de79607fe7bef042b.tar.gz |
Improve whitespace docs to reflect reality.
See also:
https://groups.google.com/d/msg/pocoo-libs/6DylMqq1voI/GXTbZJ1Tr-sJ
Diffstat (limited to 'docs')
-rw-r--r-- | docs/templates.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/templates.rst b/docs/templates.rst index a21e331..790b95e 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -152,10 +152,11 @@ yourself:: Whitespace Control ------------------ -In the default configuration whitespace is not further modified by the -template engine, so each whitespace (spaces, tabs, newlines etc.) is returned -unchanged. If the application configures Jinja to `trim_blocks` the first -newline after a a template tag is removed automatically (like in PHP). +In the default configuration, a single trailing newline is stripped if +present, and whitespace is not further modified by the template engine. Each +whitespace (spaces, tabs, newlines etc.) is returned unchanged. If the +application configures Jinja to `trim_blocks` the first newline after a a +template tag is removed automatically (like in PHP). But you can also strip whitespace in templates by hand. If you put an minus sign (``-``) to the start or end of an block (for example a for tag), a |