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.1.zip
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for MarkdownSuperscript-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7484cbc6d00c2ea2bd600d9dd9f3ddfb9911279490ce57d952de04918cb78ca4 |
|
MD5 | 40272d6eb303869fd64dc53316b49631 |
|
BLAKE2b-256 | 9f9fb29eec1177561e8e51e283dca7ecfa107e3fb17af7e06f7a00f012610eed |
Close
Hashes for MarkdownSuperscript-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf67b9ac89460e70246071f6837c7bbec1bbd6e2a39db38409ede3b4809a48a8 |
|
MD5 | b6c5c7f51835042a36eb5ee802fa6ce7 |
|
BLAKE2b-256 | 6ebb163bdc534f9c982df128ae61fe179c523b5fb4598a712af335a6f2872de8 |