mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 11:27:00 +00:00
[Doc] Add a note about escaping backslashes inside strings
This commit is contained in:
committed by
Fabien Potencier
parent
f0a4fa6784
commit
463ea80126
+3
-1
@@ -587,7 +587,9 @@ exist:
|
|||||||
string. They are useful whenever you need a string in the template (for
|
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
|
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
|
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
|
* ``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,
|
writing the number down. If a dot is present the number is a float,
|
||||||
|
|||||||
Reference in New Issue
Block a user