Skip to content

exaroth/mdx_custom_span_class

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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>

Installation

pip install git+git://github.com/exaroth/mdx_custom_span_class.git

Usage

import markdown

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

About

Simple module for Python-Markdown which allows inserting text with custom class

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages