You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.4 KiB
44 lines
1.4 KiB
Python-Markdown Extra
|
|
=====================
|
|
|
|
Summary
|
|
-------
|
|
|
|
A compilation of various Python-Markdown extensions that (mostly) imitates
|
|
[PHP Markdown Extra](http://michelf.com/projects/php-markdown/extra/).
|
|
|
|
The supported extensions include:
|
|
|
|
* [[Abbreviations]]
|
|
* [[Definition_Lists]]
|
|
* [[Fenced_Code_Blocks]]
|
|
* [[Footnotes]]
|
|
* [[HeaderId]]
|
|
* [[Tables]]
|
|
|
|
See each individual extension for syntax documentation. Extra and all it's
|
|
supported extensions are included in the standard Markdown library.
|
|
|
|
Usage
|
|
-----
|
|
|
|
From the Python interpreter:
|
|
|
|
>>> import markdown
|
|
>>> html = markdown.markdown(text, ['extra'])
|
|
|
|
In the unlikely event that one or more of the supported extensions are not
|
|
available for import, Markdown will simply continue without that
|
|
extension. If you would like to be notified of such failures,
|
|
you may set Python-Markdown's logger level to "WARN".
|
|
|
|
There may be additional extensions that are distributed with
|
|
Python-Markdown that are not included here in Extra. Those extensions
|
|
are not part of PHP Markdown Extra, and therefore, not part of
|
|
Python-Markdown Extra. If you really would like Extra to include
|
|
additional extensions, we suggest creating your own clone of Extra
|
|
under a different name (see [[Writing Extensions]]). You could also
|
|
edit the `extensions` global variable defined in the source, but be
|
|
aware that such changes may be lost when you upgrade to any future
|
|
version of Python-Markdown.
|