From: Adam Johnson Date: Tue, 26 Jan 2021 13:38:00 +0000 (+0000) Subject: Fix "If" example in documentation (#1337) X-Git-Tag: 3.0.0rc1~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d69d20c1d5c7af725417ca588e9c1191d9957bc;p=thirdparty%2Fjinja.git Fix "If" example in documentation (#1337) Fix "If" example in documentation --- diff --git a/docs/templates.rst b/docs/templates.rst index d69c709f..14de875e 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -1387,7 +1387,7 @@ The `else` part is optional. If not provided, the else block implicitly evaluates into an :class:`Undefined` object (regardless of what ``undefined`` in the environment is set to): -.. sourcecode:: jinja +.. code-block:: jinja {{ "[{}]".format(page.title) if page.title }}