[Doc] Add a note about escaping backslashes inside strings

This commit is contained in:
Javier Eguiluz
2016-03-18 15:04:30 +01:00
committed by Fabien Potencier
parent f0a4fa6784
commit 463ea80126
+3 -1
View File
@@ -587,7 +587,9 @@ exist:
string. They are useful whenever you need a string in the template (for
example as arguments to function calls, filters or just to extend or include
a template). A string can contain a delimiter if it is preceded by a
backslash (``\``) -- like in ``'It\'s good'``.
backslash (``\``) -- like in ``'It\'s good'``. If the string contains a
backslash (e.g. ``'c:\Program Files'``) escape it by doubling it
(e.g. ``'c:\\Program Files'``).
* ``42`` / ``42.23``: Integers and floating point numbers are created by just
writing the number down. If a dot is present the number is a float,