From 9bcf7719d1a9569ab7c989e826c13311bae8b1bd Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 14 Dec 2010 09:16:13 +0100 Subject: [PATCH] tweaked doc --- doc/02-Twig-for-Template-Designers.markdown | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/02-Twig-for-Template-Designers.markdown b/doc/02-Twig-for-Template-Designers.markdown index 68a096c..9adde3d 100644 --- a/doc/02-Twig-for-Template-Designers.markdown +++ b/doc/02-Twig-for-Template-Designers.markdown @@ -1079,8 +1079,8 @@ The `format` filter formats a given string by replacing the placeholders (placeholders follows the `printf` notation): [twig] - {# string is a format string like: #} - {{ string|format(foo, "bar") }} + {{ "I like %s and %s."|format(foo, "bar") }} + {# returns I like foo and bar. (if the foo parameter equals to the foo string) #} ### `replace` (new in Twig 0.9.9) @@ -1089,8 +1089,8 @@ The `replace` filter formats a given string by replacing the placeholders (placeholders are free-form): [twig] - {# string is a format string like: I like %this% and %that%. #} - {{ string|replace({'%this%': foo, '%that%': "bar"}) }} + {{ "I like %this% and %that%."|replace({'%this%': foo, '%that%': "bar"}) }} + {# returns I like foo and bar. (if the foo parameter equals to the foo string) #} ### `cycle` -- 1.7.2.5