X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=vendor%2Ftwig%2Ftwig%2Fdoc%2Ffilters%2Freplace.rst;h=31392f311546f8cdb9cb4091e55fb1f43f466df4;hb=4e1bfbf98b844da83b18aca92ef00f11a4735806;hp=8dbb745939b7b2f1e91fe1c68330a1ea895dbcb9;hpb=eba34333e3c89f208d2f72fa91351ad019a71583;p=yaffs-website diff --git a/vendor/twig/twig/doc/filters/replace.rst b/vendor/twig/twig/doc/filters/replace.rst index 8dbb74593..31392f311 100644 --- a/vendor/twig/twig/doc/filters/replace.rst +++ b/vendor/twig/twig/doc/filters/replace.rst @@ -11,6 +11,12 @@ The ``replace`` filter formats a given string by replacing the placeholders {# outputs I like foo and bar if the foo parameter equals to the foo string. #} + {# using % as a delimiter is purely conventional and optional #} + + {{ "I like this and --that--."|replace({'this': foo, '--that--': "bar"}) }} + + {# outputs I like foo and bar #} + Arguments ---------