mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 11:56:50 +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 %}
|
||||
<div>
|
||||
<strong>foo</strong>
|
||||
<strong>foo bar</strong>
|
||||
</div>
|
||||
{% 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
|
||||
level. By using the whitespace control modifier on your tags, you can trim
|
||||
|
||||
Reference in New Issue
Block a user