Skip to content

Commit

Permalink
Improve whitespace docs to reflect reality.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul McMillan committed Jul 4, 2012
1 parent a21f2ed commit b4188e0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b4188e0

Please sign in to comment.