blob: 9ea58983c7af5a966c152921fece7ac7dac6a192 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
.. _api/main:
==========
Python API
==========
Source text parsers
-------------------
.. _api/docutils_parser:
Docutils
........
.. autoclass:: myst_parser.docutils_.Parser
:members: parse
:undoc-members:
:member-order: bysource
:show-inheritance:
.. _api/sphinx_parser:
Sphinx
......
.. autoclass:: myst_parser.parsers.sphinx_.MystParser
:members: supported, parse
:undoc-members:
:member-order: bysource
:show-inheritance:
:exclude-members: __init__
.. _api/renderers:
Markdown-it to docutils
-----------------------
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
........
.. autoclass:: myst_parser.mdit_to_docutils.base.DocutilsRenderer
:special-members: __output__, __init__
:members: render, nested_render_text, add_line_and_source_path, current_node_context
:undoc-members:
:member-order: bysource
:show-inheritance:
Sphinx
......
.. autoclass:: myst_parser.mdit_to_docutils.sphinx_.SphinxRenderer
:special-members: __output__
:members: render_internal_link, render_math_block_label
:undoc-members:
:member-order: alphabetical
:show-inheritance:
.. _api/directive:
Directive and role processing
-----------------------------
This module processes the content of a directive:
.. automodule:: myst_parser.parsers.directives
:members:
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.
.. autoclass:: myst_parser.mocking.MockInliner
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: myst_parser.mocking.MockState
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: myst_parser.mocking.MockStateMachine
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: myst_parser.mocking.MockIncludeDirective
:members:
:undoc-members:
:show-inheritance:
|