Permalink
Browse files

Document the {%+ manual disable lstrip_blocks feature

  • Loading branch information...
1 parent 523efbd commit e4a74f9b9b76fc841e431123d91abcb5259ac747 @kristi committed Jul 12, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 docs/templates.rst
View
10 docs/templates.rst
@@ -180,12 +180,20 @@ gets rendered with blank lines inside the div::
</div>
-But with both `trim_blocks` and `lstrip_blocks` enabled, the lines with the template blocks are removed while preserving the whitespace of the contents::
+But with both `trim_blocks` and `lstrip_blocks` enabled, the lines with the
+template blocks are removed while preserving the whitespace of the contents::
<div>
yay
</div>
+You can manually disable the `lstrip_blocks` behavior by putting a
+plus sign (``+``) at the start of a block::
+
+ <div>
+ {%+ if something %}yay{% endif %}
+ </div>
+
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
comment or variable expression you can remove the whitespaces after or before

0 comments on commit e4a74f9

Please sign in to comment.