PyMdown Extensions is a collection of extensions for Python Markdown. Keep in mind, the PyMdown extensions were designed to work with the default extensions, so your mileage may vary in regards to compatibility when paired with other 3rd party extensions.
All extensions are found under
pymdownx. Assuming we wanted to specify the use of the MagicLink extension, we would include it in Python Markdown like so:
>>> import markdown >>> text = "A link https://google.com" >>> html = markdown.markdown(text, ['pymdownx.magiclink']) '<p>A link <a href="https://google.com">https://google.com</a></p>'
Check out documentation on each extension to learn more about how to configure and use each one.
Please read the Usage Notes for information on extension compatibility and general notes to be aware of when using these extensions.
B64 converts all local images in a document to base64 encoding and embeds them in the document.
BetterEm is a different approach to emphasis than Python Markdown's default. It works similar but handles certain corner cases differently.
Caret is an extension that is syntactically built around the
^ character. It adds support for inserting superscripts and adds an easy way to place in an
Details creates collapsible elements with
Emoji makes adding emoji via Markdown easy .
EscapeAll allows the escaping of any character, some with additional effects. Check it out to learn more.
Extra is just like Python Markdown's Extra package except it uses PyMdown Extensions to substitute similar extensions.
ExtraRawHTML exposes Python Markdown's feature of parsing markdown in HTML blocks. No longer do you have to include all of Extra when all you want to do is parse Markdown in HTML blocks.
Highlight allows you to configure the syntax highlighting of SuperFences and InlineHilite. Also passes standard Markdown indented code blocks through the syntax highlighter.
InlineHilite highlights inline code:
from module import function as func.
Keys makes inserting key inputs into documents as easy as pressing Ctrl＋Alt＋Del.
MagicLink linkafies URL and email links without having to wrap them in Markdown syntax. Also, allows shortens repository issue, pull request, and commit links. You can even use easily insert mentions: @twitter.
Mark allows you to mark words easily.
PathConverter converts paths to absolute or relative to a given base path.
ProgressBar creates progress bars quick and easy.
SmartSymbols inserts commonly used Unicode characters via simple ASCII representations:
=/= → ≠.
Snippets include other Markdown or HTML snippets into the current Markdown file being parsed.
StripHTML can strip out HTML comments and specific tag attributes.
SuperFences is like Python Markdown's fences, but better. Nest fences under lists, admonitions, and other syntaxes. Also create special custom fences for content like UML.
Title: Here is a title A->B: Normal line B-->C: Dashed line C->>D: Open arrow D-->>A: Dashed open arrow
Tasklist allows inserting lists with check boxes.
Tilde is syntactically built around the
~ character. It adds support for inserting subscripts and adds an easy way to place
text in a