minor #4695 Update replace.rst (cyphix333)

This PR was merged into the 3.x branch.

Discussion
----------

Update replace.rst

Missing `fruits` variable declaration.

Commits
-------

df3a281fc1 Update replace.rst
This commit is contained in:
Fabien Potencier
2025-10-07 07:46:05 +02:00
+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" #}