Skip to content

Commit bec5c49

Browse files
authored
Fix docstring of sphinx.util.parsing.nested_parse_to_nodes() (#14054)
1 parent 42cf2c3 commit bec5c49

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sphinx/util/parsing.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ def nested_parse_to_nodes(
3939
Note that this option bypasses Docutils' usual checks on
4040
doctree structure, and misuse of this option can lead to
4141
an incoherent doctree. In Docutils, section nodes should
42-
only be children of ``Structural`` nodes, which includes
43-
``document``, ``section``, and ``sidebar`` nodes.
42+
only be children of ``document`` or ``section`` nodes.
4443
:param keep_title_context:
4544
If this is False (the default), then *content* is parsed as if it were
4645
an independent document, meaning that title decorations (e.g. underlines)
@@ -50,6 +49,10 @@ def nested_parse_to_nodes(
5049
If this is True, then title underlines must match those in
5150
the surrounding document, otherwise the behaviour is undefined.
5251
52+
Warning: Up to Docutils 0.21, sections with a decoration style
53+
matching a level that is higher than the current section level are
54+
silently discarded! Since Docutils 0.22.1, an error is reported.
55+
5356
.. versionadded:: 7.4
5457
"""
5558
document = state.document

0 commit comments

Comments
 (0)