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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file MarkdownSuperscript-2.1.0.tar.gz.
File metadata
- Download URL: MarkdownSuperscript-2.1.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b924460cf86f60b7ade0b0fc4011dc5ca3026dbc4293ebab98cc8cc89489be4e
|
|
| MD5 |
db553b57d494446f105ecacf0cf6f52a
|
|
| BLAKE2b-256 |
bcb8eb621d9bce9a22092b76a41d8dd599a9d7b66cf202fe0cb4ea02da9a7da2
|
File details
Details for the file MarkdownSuperscript-2.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: MarkdownSuperscript-2.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62ed6e703312d4be886549e8dbf6ece4ffa7a32110cad7f0b294464aae712b0e
|
|
| MD5 |
8ba81a8af24b7f545ca78eba621260cd
|
|
| BLAKE2b-256 |
f0269e2cf8dac73ae15fb25fc79bf5dda0dce3b69bc36dbc29687f8742df3f50
|