Sphinx Parser

This class builds on the SphinxRenderer to generate a parser for Sphinx, using the Sphinx parser API:

class myst_parser.sphinx_parser.MystParser[source]

Bases: sphinx.parsers.Parser

Docutils parser for Markedly Structured Text (MyST).

supported = ('md', 'markdown', 'myst')
default_config: dict = {}
parse(inputstring: str, document: docutils.nodes.document, renderer: str = 'sphinx')[source]

Parse source text.

  • inputstring – The source string to parse

  • document – The root docutils node to add AST elements to