Skip to content

Commit

Permalink
minor #5378 [Cookbook][Controller] use the jinja lexer to render Twig…
Browse files Browse the repository at this point in the history
… code (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[Cookbook][Controller] use the jinja lexer to render Twig code

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets |

Using `twig` works on newer Sphinx versions, but makes it harder for people to build the documentation locally with older versions.

Commits
-------

52316ac use the jinja lexer to render Twig code
  • Loading branch information
xabbuh committed Jun 28, 2015
2 parents 6c012d8 + 52316ac commit b839ce6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cookbook/controller/error_pages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ The cause of this problem is that routing is done before security. If a 404 erro
occurs, the security layer isn't loaded and thus, the ``is_granted()`` function
is undefined. The solution is to add the following check before using this function:

.. code-block:: twig
.. code-block:: jinja
{% if app.user and is_granted('...') %}
{# ... #}
Expand Down

0 comments on commit b839ce6

Please sign in to comment.