Skip to content

Latest commit

 

History

History
110 lines (77 loc) · 2.52 KB

reference.rst

File metadata and controls

110 lines (77 loc) · 2.52 KB

API Reference

Directive Parsing Reference

myst_parser.parse_directives

MyST Renderers

These renderers take the markdown-it parsed token stream and convert it to the docutils AST. The sphinx renderer is a subclass of the docutils one, with some additional methods only available via sphinx .e.g. multi-document cross-referencing.

Docutils

myst_parser.docutils_renderer.DocutilsRenderer

Sphinx

myst_parser.sphinx_renderer.SphinxRenderer

Mocking

These classes are parsed to sphinx roles and directives, to mimic the original docutls rST specific parser elements, but instead run nested parsing with the markdown parser.

myst_parser.mocking.MockInliner

myst_parser.mocking.MockState

myst_parser.mocking.MockStateMachine

myst_parser.mocking.MockIncludeDirective

Additional Methods

myst_parser.docutils_renderer.make_document

myst_parser.docutils_renderer.html_meta_to_nodes

myst_parser.sphinx_renderer.minimal_sphinx_app

myst_parser.sphinx_renderer.mock_sphinx_env

Docutils Parser Reference

Sphinx Parser Reference

This class builds on the :py~myst_parser.sphinx_renderer.SphinxRenderer to generate a parser for Sphinx, using the Sphinx parser API <sphinx:parser-api>:

myst_parser.sphinx_parser.MystParser