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: Tuple[str, ] = ('md', 'markdown', 'myst')

Aliases this parser supports.

parse(inputstring: str, document: docutils.nodes.document, renderer: str = 'sphinx')None[source]

Parse source text.

Parameters
  • inputstring – The source string to parse

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