added more information about single-quoted vs double-quoted strings

This commit is contained in:
Fabien Potencier
2012-08-31 09:12:18 +02:00
parent f76ed618c8
commit 459720ff3b
+7 -2
View File
@@ -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