8.3.2.2.3.33. parse_text_to_nodes

DispatcherSphinxDirective.parse_text_to_nodes(text: str = '', /, *, offset: int = -1, allow_section_headings: bool = False) list[Node]

Parse text into nodes.

Parameters:
  • text – Text, in string form. StringList is also accepted.

  • allow_section_headings – Are titles (sections) allowed in text? Note that this option bypasses Docutils’ usual checks on doctree structure, and misuse of this option can lead to an incoherent doctree. In Docutils, section nodes should only be children of Structural nodes, which includes document, section, and sidebar nodes.

  • offset – The offset of the content.

Added in version 7.4.