@@ -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 #}
@@ -861,23 +861,21 @@ Consider the following as the content of ``file.txt``:
861861 d
862862 e
863863
864- .. code-block :: twig
864+ .. code-block :: html+ twig
865865
866866 {{ '/path/to/file.txt'|file_excerpt(line = 4, srcContext = 1) }}
867- {# output:
868- <ol start="3">
869- <li><a class="anchor" id="line3"></a><code>c</code></li>
870- <li class="selected"><a class="anchor" id="line4"></a><code>d</code></li>
871- <li><a class="anchor" id="line5"></a><code>e</code></li>
872- </ol>
873- #}
867+ {# output: #}
868+ <ol start="3">
869+ <li><a class="anchor" id="line3"></a><code>c</code></li>
870+ <li class="selected"><a class="anchor" id="line4"></a><code>d</code></li>
871+ <li><a class="anchor" id="line5"></a><code>e</code></li>
872+ </ol>
874873
875874 {{ '/path/to/file.txt'|file_excerpt(line = 1, srcContext = 0) }}
876- {# output:
877- <ol start="1">
878- <li class="selected"><a class="anchor" id="line1"></a><code>a</code></li>
879- </ol>
880- #}
875+ {# output: #}
876+ <ol start="1">
877+ <li class="selected"><a class="anchor" id="line1"></a><code>a</code></li>
878+ </ol>
881879
882880format_file
883881~~~~~~~~~~~
@@ -897,21 +895,19 @@ Generates the file path inside an ``<a>`` element. If the path is inside
897895the kernel root directory, the kernel root directory path is replaced by
898896``kernel.project_dir `` (showing the full path in a tooltip on hover).
899897
900- .. code-block :: twig
898+ .. code-block :: html+ twig
901899
902900 {{ '/path/to/file.txt'|format_file(line = 1, text = "my_text") }}
903- {# output:
904- <a href="/path/to/file.txt#L1"
905- title="Click to open this file" class="file_link">my_text at line 1
906- </a>
907- #}
901+ {# output: #}
902+ <a href="/path/to/file.txt#L1"
903+ title="Click to open this file" class="file_link">my_text at line 1
904+ </a>
908905
909906 {{ "/path/to/file.txt"|format_file(line = 3) }}
910- {# output:
911- <a href="/path/to/file.txt&line=3"
912- title="Click to open this file" class="file_link">/path/to/file.txt at line 3
913- </a>
914- #}
907+ {# output: #}
908+ <a href="/path/to/file.txt&line=3"
909+ title="Click to open this file" class="file_link">/path/to/file.txt at line 3
910+ </a>
915911
916912.. tip ::
917913
0 commit comments