Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 334dc80

Browse filesBrowse files
committed
Fix some syntax issues
1 parent 3c4f753 commit 334dc80
Copy full SHA for 334dc80

File tree

Expand file treeCollapse file tree

1 file changed

+21
-25
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+21
-25
lines changed

‎reference/twig_reference.rst

Copy file name to clipboardExpand all lines: reference/twig_reference.rst
+21-25Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Returns an instance of ``ControllerReference`` to be used with functions
9696
like :ref:`render() <reference-twig-function-render>` and
9797
:ref:`render_esi() <reference-twig-function-render-esi>`.
9898

99-
.. code-block:: html+twig
99+
.. code-block:: twig
100100
101101
{{ render(controller('App\\Controller\\BlogController:latest', {max: 3})) }}
102102
{# output: the content returned by the controller method; e.g. a rendered Twig template #}
@@ -851,23 +851,21 @@ Consider the following as the content of ``file.txt``:
851851
d
852852
e
853853
854-
.. code-block:: twig
854+
.. code-block:: html+twig
855855

856856
{{ '/path/to/file.txt'|file_excerpt(line = 4, srcContext = 1) }}
857-
{# output:
858-
<ol start="3">
859-
<li><a class="anchor" id="line3"></a><code>c</code></li>
860-
<li class="selected"><a class="anchor" id="line4"></a><code>d</code></li>
861-
<li><a class="anchor" id="line5"></a><code>e</code></li>
862-
</ol>
863-
#}
857+
{# output: #}
858+
<ol start="3">
859+
<li><a class="anchor" id="line3"></a><code>c</code></li>
860+
<li class="selected"><a class="anchor" id="line4"></a><code>d</code></li>
861+
<li><a class="anchor" id="line5"></a><code>e</code></li>
862+
</ol>
864863
865864
{{ '/path/to/file.txt'|file_excerpt(line = 1, srcContext = 0) }}
866-
{# output:
867-
<ol start="1">
868-
<li class="selected"><a class="anchor" id="line1"></a><code>a</code></li>
869-
</ol>
870-
#}
865+
{# output: #}
866+
<ol start="1">
867+
<li class="selected"><a class="anchor" id="line1"></a><code>a</code></li>
868+
</ol>
871869
872870
format_file
873871
~~~~~~~~~~~
@@ -887,21 +885,19 @@ Generates the file path inside an ``<a>`` element. If the path is inside
887885
the kernel root directory, the kernel root directory path is replaced by
888886
``kernel.project_dir`` (showing the full path in a tooltip on hover).
889887

890-
.. code-block:: twig
888+
.. code-block:: html+twig
891889

892890
{{ '/path/to/file.txt'|format_file(line = 1, text = "my_text") }}
893-
{# output:
894-
<a href="/path/to/file.txt#L1"
895-
title="Click to open this file" class="file_link">my_text at line 1
896-
</a>
897-
#}
891+
{# output: #}
892+
<a href="/path/to/file.txt#L1"
893+
title="Click to open this file" class="file_link">my_text at line 1
894+
</a>
898895
899896
{{ "/path/to/file.txt"|format_file(line = 3) }}
900-
{# output:
901-
<a href="/path/to/file.txt&amp;line=3"
902-
title="Click to open this file" class="file_link">/path/to/file.txt at line 3
903-
</a>
904-
#}
897+
{# output: #}
898+
<a href="/path/to/file.txt&amp;line=3"
899+
title="Click to open this file" class="file_link">/path/to/file.txt at line 3
900+
</a>
905901
906902
.. tip::
907903

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.