aboutsummaryrefslogtreecommitdiffstats
path: root/docs/extensions/index.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/extensions/index.txt')
-rw-r--r--docs/extensions/index.txt79
1 files changed, 34 insertions, 45 deletions
diff --git a/docs/extensions/index.txt b/docs/extensions/index.txt
index 5cbdd7d..99ca8c7 100644
--- a/docs/extensions/index.txt
+++ b/docs/extensions/index.txt
@@ -12,16 +12,22 @@ 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.
+To use an extension, pass it to markdown with the `extensions` keyword.
+
+ markdown.markdown(some_text, extensions=[MyExtension(), 'path.to.my.ext', 'footnotes'])
- markdown.markdown(some_text, extensions=['footnotes', 'nl2br'])
+See the [Library Reference](../reference.html#extensions) for more details.
-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.
+From the command line, specify an extension with the `-x` option.
python -m markdown -x footnotes -x tables input.txt > output.html
+See the [Command Line docs](../cli.html) 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.html) for details.
+
Officially Supported Extensions
-------------------------------
@@ -29,25 +35,29 @@ 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`
-
+available to you using the "name" listed in the second column below.
+
+Extension | "Name"
+------------------------------------ | ---------------
+[Extra] | `extra`
+    [Abbreviations][] | `abbr`
+    [Attribute Lists][] | `attr_list`
+    [Definition Lists][] | `def_list`
+    [Fenced Code Blocks][] | `fenced_code`
+    [Footnotes][] | `footnotes`
+    [Tables][] | `tables`
+    [Smart Strong][] | `smart_strong`
+[Admonition][] | `admonition`
+[CodeHilite][] | `codehilite`
+[HTML Tidy][] | `html_tidy`
+[HeaderId] | `headerid`
+[Meta-Data] | `meta`
+[New Line to Break] | `nl2br`
+[Sane Lists] | `sane_lists`
+[Table of Contents] | `toc`
+[WikiLinks] | `wikilinks`
+
+[Extra]: extra.html
[Abbreviations]: abbreviations.html
[Attribute Lists]: attr_list.html
[Definition Lists]: definition_lists.html
@@ -55,24 +65,6 @@ Extension | Name in Python-Markdown
[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
---------- | -----------------------
-[Admonition][] | `admonition`
-[CodeHilite][] | `codehilite`
-[HTML Tidy][] | `html_tidy`
-[HeaderId] | `headerid`
-[Meta-Data] | `meta`
-[New Line to Break] | `nl2br`
-[Sane Lists] | `sane_lists`
-[Table of Contents] | `toc`
-[WikiLinks] | `wikilinks`
-
[Admonition]: admonition.html
[CodeHilite]: code_hilite.html
[HTML Tidy]: html_tidy.html
@@ -92,6 +84,3 @@ extensions](https://github.com/waylan/Python-Markdown/wiki/Third-Party-Extension
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.