Browse code

fiwed internal link

Fabien Potencier authored on 12/10/2018 14:15:08
Showing 2 changed files
... ...
@@ -14,11 +14,10 @@ The ``json_encode`` filter returns the JSON representation of a value:
14 14
 Arguments
15 15
 ---------
16 16
 
17
-* ``options``: A bitmask of `json_encode options`_ (``{{
17
+* ``options``: A bitmask of `json_encode options`_: ``{{
18 18
   data|json_encode(constant('JSON_PRETTY_PRINT')) }}``.
19
-  Combine constants using `Twig's bitwise operators`: ``{{
20
-  data|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_HEX_QUOT') }}``)
19
+  Combine constants using :ref:`bitwise operators<template_logic>`:
20
+  ``{{ data|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_HEX_QUOT') }}``
21 21
 
22 22
 .. _`json_encode`: https://secure.php.net/json_encode
23 23
 .. _`json_encode options`: https://secure.php.net/manual/en/json.constants.php
24
-.. _`Twig's bitwise operators`: https://twig.symfony.com/doc/2.x/templates.html#logic
... ...
@@ -659,6 +659,8 @@ but exists for completeness' sake. The following operators are supported:
659 659
 * ``**``: Raises the left operand to the power of the right operand. ``{{ 2 **
660 660
   3 }}`` would return ``8``.
661 661
 
662
+.. _template_logic:
663
+
662 664
 Logic
663 665
 ~~~~~
664 666
 
... ...
@@ -674,7 +676,7 @@ You can combine multiple expressions with the following operators:
674 676
 
675 677
 .. note::
676 678
 
677
-    Twig also support bitwise operators (``b-and``, ``b-xor``, and ``b-or``).
679
+    Twig also supports bitwise operators (``b-and``, ``b-xor``, and ``b-or``).
678 680
 
679 681
 .. note::
680 682