minor #4827 Document {#--#} as the replacement for the deprecated spaceless filter (fabpot)

This PR was merged into the 3.x branch.

Discussion
----------

Document {#--#} as the replacement for the deprecated spaceless filter

Closes #4442

Commits
-------

c29877f54a Document {#--#} as the replacement for the deprecated spaceless filter
This commit is contained in:
Fabien Potencier
2026-06-03 22:03:07 +02:00
+12
View File
@@ -1299,6 +1299,18 @@ the modifiers on one side of a tag or on both sides:
{{~ value }} </li>
{# outputs '<li>\nno spaces </li>' #}
To remove the whitespace between two tags, use an empty comment with the
whitespace trimming modifier on both sides:
.. code-block:: html+twig
<div>
{#--#}
<strong>foo</strong>
{#--#}
</div>
{# outputs '<div><strong>foo</strong></div>' #}
Extensions
----------