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.0c1.zip
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for MarkdownSuperscript-1.0c1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2a2b9bdf1ac68f80310a0edaa6415ef309d9629dfbe38ed7db6f967bb10b387 |
|
MD5 | c853046c559be4cc72f71237e68ce076 |
|
BLAKE2b-256 | 6505cb7a17f178d8950707cf74fb69dbc9e1b0efdc6ffdfba16e56e12daa10c7 |
Close
Hashes for MarkdownSuperscript-1.0c1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a172fd0b63ddf555c5db5915425f996a4711a21062f172846ff3b35b48f8321b |
|
MD5 | 7a31d3a19813daa91287c5997810bb0d |
|
BLAKE2b-256 | 32df5af69fa42da8e80b191020dbd9cca5590c3c8655c91f427b537f8d3c9356 |