mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-13 17:02:12 -05:00
#1583: Allow the line numbering of the directive literalinclude to match that of the included file, using a new `lineno-match` option.
This commit is contained in:
1 parent
86ff9589bc
commit
de8f428528
4 files changed
+43
-11
No files matched your search
@@ -71,6 +71,22 @@ Literalinclude options
|
||||
:tab-width: 8
|
||||
:language: python
|
||||
|
||||
.. cssclass:: inc-pyobj-lines-match
|
||||
.. literalinclude:: literal.inc
|
||||
:pyobject: Foo
|
||||
:lineno-match:
|
||||
|
||||
.. cssclass:: inc-lines-match
|
||||
.. literalinclude:: literal.inc
|
||||
:lines: 6-7,9
|
||||
:lineno-match:
|
||||
|
||||
.. cssclass:: inc-startend-match
|
||||
.. literalinclude:: literal.inc
|
||||
:start-after: coding: utf-8
|
||||
:end-before: class Foo
|
||||
:lineno-match:
|
||||
|
||||
Test if dedenting before parsing works.
|
||||
|
||||
.. highlight:: python
|
||||
|
||||
Reference in new issue
Block a user