summaryrefslogtreecommitdiff
path: root/docs/extensions/index.md
blob: 34f80848dbf5c2662a85b814aca3856abc1d4f96 (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
title: Extensions

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 to markdown with the `extensions` keyword.

```python
markdown.markdown(some_text, extensions=[MyExtension(), 'path.to.my.ext', 'markdown.extensions.footnotes'])
```

See the [Library Reference](../reference.md#extensions) for more details.

From the command line, specify an extension with the `-x` option.

```bash
python -m markdown -x markdown.extensions.footnotes -x markdown.extensions.tables input.txt > output.html
```

See the [Command Line docs](../cli.md) or use the `--help` option for more details.

!!! seealso "See Also"
    If you would like to write your own extensions, see the
    [Extension API](api.md) for details.

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 using the "name" listed in the second column below.

Extension                            | "Name"
------------------------------------ | ---------------
[Extra]                              | `markdown.extensions.extra`
    [Abbreviations][]      | `markdown.extensions.abbr`
    [Attribute Lists][]    | `markdown.extensions.attr_list`
    [Definition Lists][]   | `markdown.extensions.def_list`
    [Fenced Code Blocks][] | `markdown.extensions.fenced_code`
    [Footnotes][]          | `markdown.extensions.footnotes`
    [Tables][]             | `markdown.extensions.tables`
    [Smart Strong][]       | `markdown.extensions.smart_strong`
[Admonition][]                       | `markdown.extensions.admonition`
[CodeHilite][]                       | `markdown.extensions.codehilite`
[HeaderId]                           | `markdown.extensions.headerid`
[Meta-Data]                          | `markdown.extensions.meta`
[New Line to Break]                  | `markdown.extensions.nl2br`
[Sane Lists]                         | `markdown.extensions.sane_lists`
[SmartyPants]                        | `markdown.extensions.smarty`
[Table of Contents]                  | `markdown.extensions.toc`
[WikiLinks]                          | `markdown.extensions.wikilinks`

[Extra]: extra.md
[Abbreviations]: abbreviations.md
[Attribute Lists]: attr_list.md
[Definition Lists]: definition_lists.md
[Fenced Code Blocks]: fenced_code_blocks.md
[Footnotes]: footnotes.md
[Tables]: tables.md
[Smart Strong]: smart_strong.md
[Admonition]: admonition.md
[CodeHilite]: code_hilite.md
[HeaderId]: header_id.md
[Meta-Data]: meta_data.md
[New Line to Break]: nl2br.md
[Sane Lists]: sane_lists.md
[SmartyPants]: smarty.md
[Table of Contents]: toc.md
[WikiLinks]: wikilinks.md

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][list]
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.

[list]: https://github.com/Python-Markdown/markdown/wiki/Third-Party-Extensions