From: Fabien Potencier Date: Thu, 30 Dec 2010 10:40:02 +0000 (+0100) Subject: added a caution about nested hashes in the docs X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=1f452f0aba452920cf73fffe68662b2f434a5540;p=web%2Fkonrad%2Ftwig.git added a caution about nested hashes in the docs --- diff --git a/doc/templates.rst b/doc/templates.rst index 589e799..b3ae80c 100644 --- a/doc/templates.rst +++ b/doc/templates.rst @@ -969,6 +969,13 @@ Arrays and hashes can be nested: {% set foo = [1, {"foo": "bar"}] %} +.. caution:: + + When defining nested hashes, be careful to put at least one whitespace + between the two closing curly braces like in this example: ``{ 'foo: { + 'bar': 'foobar' } }``. If not, Twig will interpret ``}}`` as the end of + the expression. + Math ~~~~