Update replace.rst

Missing `fruits` variable declaration.
This commit is contained in:
Brett
2025-10-07 07:09:13 +08:00
committed by GitHub
parent a895a3f00d
commit df3a281fc1
+2
View File
@@ -6,6 +6,8 @@ format is free-form):
.. code-block:: twig
{% set fruit = 'apples' %}
{{ "I like %this% and %that%."|replace({'%this%': fruit, '%that%': "oranges"}) }}
{# if the "fruit" variable is set to "apples", #}
{# it outputs "I like apples and oranges" #}