File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 185
185
('py:class' , 'Node' ), # sphinx.domains.Domain
186
186
('py:class' , 'NullTranslations' ), # gettext.NullTranslations
187
187
('py:class' , 'RoleFunction' ), # sphinx.domains.Domain
188
+ ('py:class' , 'RSTState' ), # sphinx.utils.parsing.nested_parse_to_nodes
188
189
('py:class' , 'Theme' ), # sphinx.application.TemplateBridge
189
- ('py:class' , 'system_message' ), # sphinx.utils.docutils
190
+ ('py:class' , 'StringList' ), # sphinx.utils.parsing.nested_parse_to_nodes
191
+ ('py:class' , 'system_message' ), # sphinx.utils.docutils.SphinxDirective
190
192
('py:class' , 'TitleGetter' ), # sphinx.domains.Domain
191
193
('py:class' , 'XRefRole' ), # sphinx.domains.Domain
192
194
('py:class' , 'docutils.nodes.Element' ),
Original file line number Diff line number Diff line change 5
5
import contextlib
6
6
from typing import TYPE_CHECKING
7
7
8
- from docutils import nodes
8
+ from docutils . nodes import Element , Node
9
9
from docutils .statemachine import StringList , string2lines
10
10
11
11
if TYPE_CHECKING :
@@ -22,7 +22,7 @@ def nested_parse_to_nodes(
22
22
offset : int = 0 ,
23
23
allow_section_headings : bool = True ,
24
24
keep_title_context : bool = False ,
25
- ) -> list [nodes . Node ]: # Element | nodes.Text
25
+ ) -> list [Node ]: # Element | nodes.Text
26
26
"""Parse *text* into nodes.
27
27
28
28
:param state:
@@ -53,7 +53,7 @@ def nested_parse_to_nodes(
53
53
content = _text_to_string_list (
54
54
text , source = source , tab_width = document .settings .tab_width ,
55
55
)
56
- node = nodes . Element () # Anonymous container for parsing
56
+ node = Element () # Anonymous container for parsing
57
57
node .document = document
58
58
59
59
if keep_title_context :
You can’t perform that action at this time.
0 commit comments