Simple module for Python-Markdown which allows inserting text with custom class
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore init Apr 16, 2014 Fix to readme Apr 16, 2014

Custom Span Class Markdown Extension

This is a simple extension for Python-Markdown library, which allows adding span elements with custom 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>


pip install git+git://


import markdown

md = markdown.Markdown(extensions=["custom_span_class"])
md.convert("I love !!text-danger|spam!!")