Skip to content

Commit ded86b5

Browse files
committed
[Twig] [twig reference] add examples to function and filters - fix html
1 parent 0c69272 commit ded86b5

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Diff for: reference/twig_reference.rst

+12-2
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,12 @@ FQCN will be shown in a tooltip when a user hovers over the element).
551551
.. code-block:: twig
552552
553553
{{ 'App\\Entity\\Product'|abbr_class }}
554-
{# output: <abbr title="App\Entity\Product">Product</abbr> #}
554+
555+
The above example will be rendered as:
556+
557+
.. code-block:: html
558+
559+
<abbr title="App\Entity\Product">Product</abbr>
555560

556561
abbr_method
557562
~~~~~~~~~~~
@@ -570,7 +575,12 @@ doesn't have a class name, it's shown as a function (``method()``).
570575
.. code-block:: twig
571576
572577
{{ 'App\\Controller\\ProductController::list'|abbr_method }}
573-
{# output: <abbr title="App\Controller\ProductController">ProductController</abbr> #}
578+
579+
The above example will be rendered as:
580+
581+
.. code-block:: html
582+
583+
<abbr title="App\Controller\ProductController">ProductController</abbr>
574584

575585
format_args
576586
~~~~~~~~~~~

0 commit comments

Comments
 (0)