diff --git a/doc/templates.rst b/doc/templates.rst
index 0b38d5bcc..9070c14c2 100644
--- a/doc/templates.rst
+++ b/doc/templates.rst
@@ -1299,6 +1299,18 @@ the modifiers on one side of a tag or on both sides:
{{~ value }}
{# outputs '
\nno spaces ' #}
+To remove the whitespace between two tags, use an empty comment with the
+whitespace trimming modifier on both sides:
+
+.. code-block:: html+twig
+
+
+ {#--#}
+ foo
+ {#--#}
+
+ {# outputs 'foo
' #}
+
Extensions
----------