/
index.txt
97 lines (76 loc) · 3.21 KB
/
index.txt
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
title: Extensions
prev_title: Command Line
prev_url: ../cli.html
next_title: Extra Extension
next_url: extra.html
Available Extensions
====================
Python Markdown offers a flexible extension mechanism, which makes it possible
to change and/or extend the behavior of the parser without having to edit the
actual source files.
To use an extension, pass it's name to markdown with the `extensions` keyword.
See the [Library Reference](../reference.html#extensions) for more details.
markdown.markdown(some_text, extensions=['footnotes', 'nl2br'])
From the command line, specify an extension with the `-x` option. See the
[Command Line docs](../cli.html) or use the `--help` option for more details.
python -m markdown -x footnotes -x tables input.txt > output.html
Officially Supported Extensions
-------------------------------
The extensions listed below are included with (at least) the most recent release
and are officially supported by Python-Markdown. Any documentation is
maintained here and all bug reports should be made to the project. If you
have a typical install of Python-Markdown, these extensions are already
available to you.
### Markdown Extra
You can enable **all** these extensions just as if it was a single
`extra` extension. Example:
markdown.markdown(some_text, extensions=['extra', 'codehilite'])
Extension | Name in Python-Markdown
--------- | -----------------------
[Abbreviations][] | `abbr`
[Attribute Lists][] | `attr_list`
[Definition Lists][] | `def_list`
[Fenced Code Blocks][] | `fenced_code`
[Footnotes][] | `footnotes`
[Tables][] | `tables`
[Smart Strong][] | `smart_strong`
[Abbreviations]: abbreviations.html
[Attribute Lists]: attr_list.html
[Definition Lists]: definition_lists.html
[Fenced Code Blocks]: fenced_code_blocks.html
[Footnotes]: footnotes.html
[Tables]: tables.html
[Smart Strong]: smart_strong.html
### Other extensions
There are also some extensions that are not included in Markdown Extra
but come in the standard Python-Markdown library.
Extension | Name in Python-Markdown
--------- | -----------------------
[CodeHilite][] | `codehilite`
[HTML Tidy][] | `html_tidy`
[HeaderId] | `headerid`
[Meta-Data] | `meta`
[New Line to Break] | `nl2br`
[RSS] | `rss`
[Sane Lists] | `sane_lists`
[Table of Contents] | `toc`
[WikiLinks] | `wikilinks`
[CodeHilite]: code_hilite.html
[HTML Tidy]: html_tidy.html
[HeaderId]: header_id.html
[Meta-Data]: meta_data.html
[New Line to Break]: nl2br.html
[RSS]: rss.html
[Sane Lists]: sane_lists.html
[Table of Contents]: toc.html
[WikiLinks]: wikilinks.html
Third Party Extensions
----------------------
Various individuals and/or organizations have developed extensions which they
have made available to the public. A [list of third party
extensions](https://github.com/waylan/Python-Markdown/wiki/Third-Party-Extensions)
is maintained on the wiki for your convenience. The Python-Markdown team
offers no official support for these extensions. Please see the developer of
each extension for support.
If you would like to write your own extensions, see the
[Extensions API](api.html) for details.