From df3a281fc1ec5ba15538e78cbb37d7b34da9ca1d Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 7 Oct 2025 07:09:13 +0800 Subject: [PATCH] Update replace.rst Missing `fruits` variable declaration. --- doc/filters/replace.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/filters/replace.rst b/doc/filters/replace.rst index 63e7f4800..8053ae1eb 100644 --- a/doc/filters/replace.rst +++ b/doc/filters/replace.rst @@ -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" #}