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 and 2.6)
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, ['superscript'])
'<p>2<sup>10</sup> is 1024.</p>'
Command Line
$ echo '2^10^ is 1024.' > text.md
$ python -m markdown -o html5 -x '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.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 889c6b044664c42ccfe6d5539effcb7988cf5a40fc7e551a4aa04f9860105db7 |
|
MD5 | fc8d720331fddc5fb18ba6b420bc74f0 |
|
BLAKE2b-256 | 7fcf05d997909580b928d43b21bbf5999e654ef308a7680b442cc5aedb58ddf2 |
Hashes for MarkdownSuperscript-2.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 583a187bd86eef11d64ddbde5398bfabdffd86a17078c903ee3d2875df3343c0 |
|
MD5 | bc33916b1c148e9293eea3f3404a455b |
|
BLAKE2b-256 | 29b189a4fcaeb86c7cc7ebc67fa03ec2cf6a0db1abedcd9070b378f20ba055a1 |