myst_parser.parsers.sphinx_#

MyST Markdown parser for sphinx.

1.  Module Contents#

1.1.  Classes#

MystParser

Sphinx parser for Markedly Structured Text (MyST).

1.2.  Data#

1.3.  API#

myst_parser.parsers.sphinx_.SPHINX_LOGGER = 'getLogger(...)'#
class myst_parser.parsers.sphinx_.MystParser[源代码]#

Bases: sphinx.parsers.Parser

Sphinx parser for Markedly Structured Text (MyST).

supported: tuple[str, ...] = ('md', 'markdown', 'myst')#

Aliases this parser supports.

settings_spec = None#

Runtime settings specification.

Defines runtime settings and associated command-line options, as used by docutils.frontend.OptionParser. This is a concatenation of tuples of:

  • Option group title (string or None which implies no group, just a list of single options).

  • Description (string or None).

  • A sequence of option tuples

config_section = 'myst parser'#
config_section_dependencies = ('parsers',)#
translate_section_name = None#
get_transforms()[源代码]#
parse(inputstring: str, document: docutils.nodes.document) None[源代码]#

Parse source text.

参数:
  • inputstring -- The source string to parse

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