diff --git a/doc/templates.rst b/doc/templates.rst index e09a6a018..b0f5b9a1c 100644 --- a/doc/templates.rst +++ b/doc/templates.rst @@ -589,6 +589,16 @@ inserted into the string: {{ "foo #{bar} baz" }} {{ "foo #{1 + 2} baz" }} +.. tip:: + + String interpolations can be ignored by escaping them with a backslash + (``\``): + + .. code-block:: twig + + {# outputs foo #{1 + 2} baz #} + {{ "foo \#{1 + 2} baz" }} + Math ~~~~