File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -595,14 +595,16 @@ file_excerpt
595
595
596
596
.. code-block :: twig
597
597
598
- {{ file|file_excerpt(line = null ) }}
598
+ {{ file|file_excerpt(line, srcContext = 3 ) }}
599
599
600
600
``file ``
601
601
**type **: ``string ``
602
- ``line `` *(optional) *
602
+ ``line ``
603
+ **type **: ``integer ``
604
+ ``srcContext `` *(optional) *
603
605
**type **: ``integer ``
604
606
605
- Generates an excerpt of seven lines around the given ``line ``.
607
+ Generates an excerpt of a code file around the given ``line `` number. An optional number of displayed lines can be passed .
606
608
607
609
format_file
608
610
~~~~~~~~~~~
@@ -639,12 +641,14 @@ file_link
639
641
640
642
.. code-block :: twig
641
643
642
- {{ file|file_link(line = null ) }}
644
+ {{ file|file_link(line) }}
643
645
644
- ``line `` *(optional) *
646
+ ``file ``
647
+ **type **: ``string ``
648
+ ``line ``
645
649
**type **: ``integer ``
646
650
647
- Generates a link to the provided file ( and optionally line number) using
651
+ Generates a link to the provided file and line number using
648
652
a preconfigured scheme.
649
653
650
654
.. _reference-twig-tags :
You can’t perform that action at this time.
0 commit comments