From 459720ff3b74ee0c0d159277c6f2f5df89d8a4f6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 31 Aug 2012 09:12:18 +0200 Subject: [PATCH] added more information about single-quoted vs double-quoted strings --- doc/templates.rst | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/templates.rst b/doc/templates.rst index ea229f5..22c32c4 100644 --- a/doc/templates.rst +++ b/doc/templates.rst @@ -542,6 +542,11 @@ Arrays and hashes can be nested: {% set foo = [1, {"foo": "bar"}] %} +.. tip:: + + Using double-quoted or single-quoted strings has no impact on performance + but string interpolation is only supported in double-quoted strings. + Math ~~~~ @@ -678,8 +683,8 @@ String Interpolation String interpolation was added in Twig 1.5. String interpolation (`#{expression}`) allows any valid expression to appear -within a string. The result of evaluating that expression is inserted into the -string: +within a *double-quoted string*. The result of evaluating that expression is +inserted into the string: .. code-block:: jinja -- 1.7.2.5