File: api.rst

package info (click to toggle)
mistune 3.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 856 kB
  • sloc: python: 4,006; makefile: 26; sh: 6
file content (140 lines) | stat: -rw-r--r-- 2,143 bytes parent folder | download | duplicates (2)
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
API Reference
=============

Here are the list of API reference; it might be helpful for developers.

.. module:: mistune

Basic
-----

.. function:: html(text: str)

    :param text: markdown formatted text

    Turn markdown text into HTML without escaping. For instance::

        text = '**hello** <span>world</span>'
        mistune.html(text)

        # =>
        '<p><strong>hello</strong> <span>world</span></p>'

.. autofunction:: create_markdown

Utilities
---------

.. autofunction:: escape

.. autofunction:: escape_url

.. autofunction:: safe_entity

.. autofunction:: unikey

Advanced
--------

.. autoclass:: Markdown

.. autoclass:: BlockState
    :inherited-members:

.. autoclass:: InlineState
    :inherited-members:

.. autoclass:: BlockParser
    :inherited-members: register

.. autoclass:: InlineParser
    :inherited-members: register

Plugins
-------

.. module:: mistune.plugins.footnotes

.. autofunction:: footnotes

.. module:: mistune.plugins.task_lists

.. autofunction:: task_lists

.. module:: mistune.plugins.abbr

.. autofunction:: abbr

.. module:: mistune.plugins.def_list

.. autofunction:: def_list

.. module:: mistune.plugins.table

.. autofunction:: table

.. autofunction:: table_in_quote

.. autofunction:: table_in_list

.. module:: mistune.plugins.math

.. autofunction:: math

.. autofunction:: math_in_quote

.. autofunction:: math_in_list

.. module:: mistune.plugins.ruby

.. autofunction:: ruby

.. module:: mistune.plugins.formatting

.. autofunction:: strikethrough

.. autofunction:: mark

.. autofunction:: insert

.. autofunction:: superscript

.. autofunction:: subscript

.. module:: mistune.plugins.spoiler

.. autofunction:: spoiler

Renderers
---------

.. module:: mistune.renderers.html

.. autoclass:: HTMLRenderer

.. module:: mistune.renderers.markdown

.. autoclass:: MarkdownRenderer

.. module:: mistune.renderers.rst

.. autoclass:: RSTRenderer

TOC hook
--------

.. module:: mistune.toc

.. autofunction:: add_toc_hook

.. autofunction:: render_toc_ul


Directives
----------

.. module:: mistune.directives

.. autoclass:: RSTDirective

.. autoclass:: FencedDirective