Python-Markdown extension to allow for superscript text.
Project description
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.
Installation
pip install MarkdownSuperscript
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 Distributions
MarkdownSuperscript-1.0.zip
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for MarkdownSuperscript-1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efb1da3535786c4052ab5d7b0e5bc13d2cccdf4e519a644acf140b9bca4f9ae2 |
|
MD5 | 49855917c849bad2a47ec2e65cbb2117 |
|
BLAKE2b-256 | f9dc1e4dc8f0a2d52b89d587a30b3c801c95c03cc14bb40af81117f5152c9e8e |