Python Markdown offers a flexible extension mechanism, which makes it possibleto change and/or extend the behavior of the parser without having to edit theactual source files.
Markdown.markdown (testMarkdown, extensions= 'markdown.extensions.tables') If instead of using 'markdown.extensions.tables' I use 'markdown.extensions.extra', compile using pyinstaller, and run it, it responds back with a missing 'fencedcode' module. Basically, it seems I have to. Python-Markdown provides an API for third parties to write extensions to the parser adding their own additions or changes to the syntax. A few commonly used extensions are shipped with the markdown library. See the extension documentation (extensions/index.html) for a list of available extensions.
To use an extension, pass it to markdown with the extensions
keyword.
See the Library Reference for more details.
From the command line, specify an extension with the -x
option.
See the Command Line docs or use the --help
option for more details.
See Also
If you would like to write your own extensions, see theExtension API for details.
Officially Supported Extensions¶
The extensions listed below are included with (at least) the most recent releaseand are officially supported by Python-Markdown. Any documentation ismaintained here and all bug reports should be made to the project. If youhave a typical install of Python-Markdown, these extensions are alreadyavailable to you using the “Entry Point” name listed in the second column below.
Extension | Entry Point | Dot Notation |
---|---|---|
Extra | extra | markdown.extensions.extra |
Abbreviations | abbr | markdown.extensions.abbr |
Attribute Lists | attr_list | markdown.extensions.attr_list |
Definition Lists | def_list | markdown.extensions.def_list |
Fenced Code Blocks | fenced_code | markdown.extensions.fenced_code |
Footnotes | footnotes | markdown.extensions.footnotes |
Markdown in HTML | md_in_html | markdown.extensions.md_in_html |
Tables | tables | markdown.extensions.tables |
Admonition | admonition | markdown.extensions.admonition |
CodeHilite | codehilite | markdown.extensions.codehilite |
Legacy Attributes | legacy_attrs | markdown.extensions.legacy_attrs |
Legacy Emphasis | legacy_em | markdown.extensions.legacy_em |
Meta-Data | meta | markdown.extensions.meta |
New Line to Break | nl2br | markdown.extensions.nl2br |
Sane Lists | sane_lists | markdown.extensions.sane_lists |
SmartyPants | smarty | markdown.extensions.smarty |
Table of Contents | toc | markdown.extensions.toc |
WikiLinks | wikilinks | markdown.extensions.wikilinks |
Third Party Extensions¶
Various individuals and/or organizations have developed extensions which theyhave made available to the public. A list of third party extensionsis maintained on the wiki for your convenience. The Python-Markdown teamoffers no official support for these extensions. Please see the developer ofeach extension for support.
Latest versionReleased:
A fast and complete Python implementation of Markdown
Project description
markdown2: A fast and complete Python implementation of Markdown.
Markdown is a text-to-HTML filter; it translates an easy-to-read /easy-to-write structured text format into HTML. Markdown’s textformat is most similar to that of plain text email, and supportsfeatures such as headers, emphasis, code blocks, blockquotes, andlinks. – http://daringfireball.net/projects/markdown/
This is a fast and complete Python implementation of the Markdownspec. See http://github.com/trentm/python-markdown2 for more info.
Release historyRelease notifications | RSS feed
2.4.0
2.3.10
2.3.9
2.3.8
2.3.7
2.3.6
2.3.5
2.3.4
2.3.3
2.3.2
2.3.1
2.3.0
2.2.3
2.2.2
Python Markdown Tutorial
2.2.1
2.2.0
2.1.0
2.0.1
2.0.0
1.4.2
1.4.1
1.4.0
1.3.1
1.3.0
1.2.0
1.1.1
1.1.0
1.0.1.19
1.0.1.18
1.0.1.17
1.0.1.16
1.0.1.15
1.0.1.14
1.0.1.13
1.0.1.12
1.0.1.11
1.0.1.10
Python Markdown Module Example
1.0.1.9
1.0.1.8
Python Markdown Module Examples
1.0.1.7
1.0.1.6
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size markdown2-2.4.0-py2.py3-none-any.whl (34.6 kB) | File type Wheel | Python version py2.py3 | Upload date | Hashes |
Filename, size markdown2-2.4.0.tar.gz (96.6 kB) | File type Source | Python version None | Upload date | Hashes |
Hashes for markdown2-2.4.0-py2.py3-none-any.whl
Algorithm | Hash digest |
---|---|
SHA256 | 8d4ef4a2d090c99532069c4611a9a2b9bea6ae1fa29b6c3727c95d1e31a8f6c5 |
MD5 | aa5354f2b1eb145400074d0215fc962c |
BLAKE2-256 | 5dbe3924cc1c0e12030b5225de2b4521f1dc729730773861475de26be64a0d2b |
Hashes for markdown2-2.4.0.tar.gz
Algorithm | Hash digest |
---|---|
SHA256 | 28d769f0e544e6f68f684f01e9b186747b079a6927d9ca77ebc8c640a2829b1b |
MD5 | 7d86fe855f1080313bcda3460c231771 |
BLAKE2-256 | bc037e156a4da266e5db4fbaa8b4efc3187f14f6944d9f89f56c62b1537133b9 |