Python-Markdown extension to allow for superscript text.
Project description
Read Me
An extension to the Python Markdown project which adds the ability to
superscript text. To do so, the character ^
becomes a Markdown
tag for text meant to be superscripted, and is replaced with the HTML
sup
tag.
For example, given the text:
2^10^ is 1024.
… using Markdown with this extension will output:
<p>2<sup>10</sup> is 1024.</p>
This project is provided under the Simplified (2 Clause) BSD license, provided in full in the LICENSE file.
Installation
Dependencies:
Python 2.7, 3.3+
Markdown 2.5+ (Tested against latest patch version of Markdown 2.5, 2.6, 3.0)
To install the latest stable release (recommended):
pip install MarkdownSuperscript
To install the development version:
pip install git+git://github.com/jambonrose/markdown_superscript_extension.git
Basic Usage
Python
>>> from markdown import markdown
>>> text = "2^10^ is 1024."
>>> markdown(text, extensions=['mdx_superscript'])
'<p>2<sup>10</sup> is 1024.</p>'
Command Line
$ echo '2^10^ is 1024.' > text.md
$ python -m markdown -o html5 -x 'mdx_superscript' -f text.html text.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for MarkdownSuperscript-2.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b924460cf86f60b7ade0b0fc4011dc5ca3026dbc4293ebab98cc8cc89489be4e |
|
MD5 | db553b57d494446f105ecacf0cf6f52a |
|
BLAKE2b-256 | bcb8eb621d9bce9a22092b76a41d8dd599a9d7b66cf202fe0cb4ea02da9a7da2 |
Hashes for MarkdownSuperscript-2.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62ed6e703312d4be886549e8dbf6ece4ffa7a32110cad7f0b294464aae712b0e |
|
MD5 | 8ba81a8af24b7f545ca78eba621260cd |
|
BLAKE2b-256 | f0269e2cf8dac73ae15fb25fc79bf5dda0dce3b69bc36dbc29687f8742df3f50 |