8.3.2.1.15.33. parse_text_to_nodes¶
- DispatcherDirective.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.
StringListis 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
Structuralnodes, which includesdocument,section, andsidebarnodes.offset – The offset of the content.
Added in version 7.4.