From 1f452f0aba452920cf73fffe68662b2f434a5540 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 30 Dec 2010 11:40:02 +0100 Subject: [PATCH] added a caution about nested hashes in the docs --- doc/templates.rst | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) 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 ~~~~ -- 1.7.2.5