Skip to content

misleading docstring for sphinx.util.parsing.nested_parse_to_nodes() #13828

@gmilde

Description

@gmilde

Describe the bug

The docstring of sphinx.util.parsing.nested_parse_to_nodes() says:

... In Docutils, section nodes should only be children of Structural nodes, which includes document, section, and sidebar nodes.

However, "section" elements can only by children of "document" or "section" elements, not "sidebar".

How to Reproduce

See

in "The Docutils Document Tree"
and the Docutils Generic XML document type definition (DTD) docutils.dtd.

Environment Information

Checked with repository versions of Docutils and Sphinx.

Sphinx extensions

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions