Skip to content
Myr

fix boolean error about whitespace control (#1819)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by GitHub · parents da67299, 9c3622c · Browse files · 1 file+13 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+13 added−7 removed

  • other:+13 added−7 removed

1 file+13 added−7 removed

modified:docs/templates.rst+13 added-7 removed
200 unmodified lines
201option can also be set to strip tabs and spaces from the beginning of a202line to the start of a block. (Nothing will be stripped if there are203other characters before the start of the block.)204205With both `trim_blocks` and `lstrip_blocks` enabled, you can put block tags206on their own lines, and the entire block line will be removed when207rendered, preserving the whitespace of the contents. For example,208without the `trim_blocks` and `lstrip_blocks` options, this template::205With both ``trim_blocks`` and ``lstrip_blocks`` disabled (the default), block206tags on their own lines will be removed, but a blank line will remain and the207spaces in the content will be preserved. For example, this template:208209.. code-block:: jinja210211 <div>212 {% if True %}213 yay214 {% endif %}215 </div>216216gets rendered with blank lines inside the div::217With both ``trim_blocks`` and ``lstrip_blocks`` disabled, the template is218rendered with blank lines inside the div:219220.. code-block:: text221222 <div>223224 yay225226 </div>227224But with both `trim_blocks` and `lstrip_blocks` enabled, the template block225lines are removed and other whitespace is preserved::228With both ``trim_blocks`` and ``lstrip_blocks`` enabled, the template block229lines are completely removed:230231.. code-block:: text232233 <div>234 yay235 </div>236
1722 unmodified lines