mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 20:06:31 +00:00
Updated {% spaceless %} example to show how spaces in strings are handled.
Updated output to show space is preserved within `<div><strong>foo bar</strong></div>` HTML.
This commit is contained in:
+2
-2
@@ -796,11 +796,11 @@ Use the ``spaceless`` tag to remove whitespace *between HTML tags*:
|
|||||||
|
|
||||||
{% spaceless %}
|
{% spaceless %}
|
||||||
<div>
|
<div>
|
||||||
<strong>foo</strong>
|
<strong>foo bar</strong>
|
||||||
</div>
|
</div>
|
||||||
{% endspaceless %}
|
{% endspaceless %}
|
||||||
|
|
||||||
{# output will be <div><strong>foo</strong></div> #}
|
{# output will be <div><strong>foo bar</strong></div> #}
|
||||||
|
|
||||||
In addition to the spaceless tag you can also control whitespace on a per tag
|
In addition to the spaceless tag you can also control whitespace on a per tag
|
||||||
level. By using the whitespace control modifier on your tags, you can trim
|
level. By using the whitespace control modifier on your tags, you can trim
|
||||||
|
|||||||
Reference in New Issue
Block a user