@@ -96,7 +96,7 @@ Returns an instance of ``ControllerReference`` to be used with functions
9696like :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 #}
@@ -839,23 +839,21 @@ Consider the following as the content of ``file.txt``:
839839 d
840840 e
841841
842- .. code-block :: twig
842+ .. code-block :: html+ twig
843843
844844 {{ '/path/to/file.txt'|file_excerpt(line = 4, srcContext = 1) }}
845- {# output:
846- <ol start="3">
847- <li><a class="anchor" id="line3"></a><code>c</code></li>
848- <li class="selected"><a class="anchor" id="line4"></a><code>d</code></li>
849- <li><a class="anchor" id="line5"></a><code>e</code></li>
850- </ol>
851- #}
845+ {# output: #}
846+ <ol start="3">
847+ <li><a class="anchor" id="line3"></a><code>c</code></li>
848+ <li class="selected"><a class="anchor" id="line4"></a><code>d</code></li>
849+ <li><a class="anchor" id="line5"></a><code>e</code></li>
850+ </ol>
852851
853852 {{ '/path/to/file.txt'|file_excerpt(line = 1, srcContext = 0) }}
854- {# output:
855- <ol start="1">
856- <li class="selected"><a class="anchor" id="line1"></a><code>a</code></li>
857- </ol>
858- #}
853+ {# output: #}
854+ <ol start="1">
855+ <li class="selected"><a class="anchor" id="line1"></a><code>a</code></li>
856+ </ol>
859857
860858format_file
861859~~~~~~~~~~~
@@ -875,21 +873,19 @@ Generates the file path inside an ``<a>`` element. If the path is inside
875873the kernel root directory, the kernel root directory path is replaced by
876874``kernel.project_dir `` (showing the full path in a tooltip on hover).
877875
878- .. code-block :: twig
876+ .. code-block :: html+ twig
879877
880878 {{ '/path/to/file.txt'|format_file(line = 1, text = "my_text") }}
881- {# output:
882- <a href="/path/to/file.txt#L1"
883- title="Click to open this file" class="file_link">my_text at line 1
884- </a>
885- #}
879+ {# output: #}
880+ <a href="/path/to/file.txt#L1"
881+ title="Click to open this file" class="file_link">my_text at line 1
882+ </a>
886883
887884 {{ "/path/to/file.txt"|format_file(line = 3) }}
888- {# output:
889- <a href="/path/to/file.txt&line=3"
890- title="Click to open this file" class="file_link">/path/to/file.txt at line 3
891- </a>
892- #}
885+ {# output: #}
886+ <a href="/path/to/file.txt&line=3"
887+ title="Click to open this file" class="file_link">/path/to/file.txt at line 3
888+ </a>
893889
894890.. tip ::
895891
0 commit comments