This is a simple extension for Python-Markdown library, which allows adding span elements with custom class.
The original version was developed by exaroth.
It was then improved by plugboy.
This version allows easier installation via pip install mdx-custom-span-class
.
The syntax is:
!!<class name>|<text to be wrapped>!!
For instance:
I love !!text-alert|spam!!
will return
<p>I love <span class="text-alert">spam</span></p>
Tip: If the | symbol causes conflicts with your Markdown tables, use ^ instead of |.
pip install mdx-custom-span-class
import markdown md = markdown.Markdown(extensions=["custom-span-class"]) md.convert("I love !!text-danger|spam!!")
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4