Skip to content

Commit ead46c5

Browse files
committed
[Twig] [twig reference] add examples to functions (format_file, file_exercp, fragment_uri, controller, csrf_token)
1 parent 82a75e5 commit ead46c5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

reference/twig_reference.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Example 1
8585

8686
.. code-block:: twig
8787
88-
{{ fragment_uri(controller('App\\Controller\\HomeController::index'),
88+
{{ fragment_uri(controller('App\\Controller\\HomeController::index'),
8989
absolute = true, strict = true, sign = true) }}
9090
9191
Output:
@@ -100,7 +100,7 @@ Example 2
100100

101101
.. code-block:: twig
102102
103-
{{ fragment_uri(controller('App\\Controller\\UserController::profile',
103+
{{ fragment_uri(controller('App\\Controller\\UserController::profile',
104104
{ 'id': 42 }), absolute = false, strict = false, sign = false) }}
105105
106106
Output:
@@ -131,7 +131,7 @@ like :ref:`render() <reference-twig-function-render>` and
131131

132132
.. _reference-twig-function-asset:
133133

134-
.. code-block:: twig
134+
.. code-block:: html+twig
135135

136136
{% set myArray = {'a': 'foo', 'b': 'bar'} %}
137137

@@ -631,7 +631,7 @@ Output:
631631

632632
.. code-block:: html
633633

634-
<a href="path/to/file/file.txt#L1"
634+
<a href="path/to/file/file.txt#L1"
635635
title="Click to open this file" class="file_link">my_text at line 1
636636
</a>
637637

@@ -645,7 +645,7 @@ Output:
645645

646646
.. code-block:: html
647647

648-
<a href="path/to/file/file.txt#L3"
648+
<a href="path/to/file/file.txt#L3"
649649
title="Click to open this file" class="file_link">
650650
<abbr title="path/to/file/file.txt">file.txt</abbr>
651651
/ at line 3

0 commit comments

Comments
 (0)