mdx-custom-span-class

Markdown extension which allows inserting span elements with custom class


License
BSD-3-Clause
Install
pip install mdx-custom-span-class==1.1.4

Documentation

Custom Span Class Markdown Extension

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.

Syntax

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>

Installation

pip install mdx-custom-span-class

Usage

import markdown

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