Python-Markdown Text Decorator Extension
Project description
Python-Markdown Text Decorator Extension
This is a Python-Markdown Text Decorator Extension.
Spec
This module supports follwing expressions.
Type | Markdown | HTML |
---|---|---|
delete | --text-- |
<del>text</del> |
insert | ++text++ |
<ins>text</ins> |
strikethrough | ~~text~~ |
<s>text</s> |
Installation
python3 -m pip install markdown_text_decorator
Usage
Code
from markdown import Markdown
MARKDOWN_EXTENSIONS = [
"markdown_text_decorator"
]
md2html = Markdown(extensions=MARKDOWN_EXTENSIONS)
markdown_input = """
# Markdown Text Decoration
~~This is strikethrough line.~~
++This is insert line.++
--This is delete line.--
"""
html_output = md2html.convert(markdown_input)
print(html_output)
Result
<h1>Markdown Text Decoration</h1>
<p><s>This is strikethrough line.</s></p>
<p><ins>This is insert line.</ins> </p>
<p><del>This is delete line.</del></p>
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
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for markdown_text_decorator-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 737dde36c6bf2822c51442318710daa5236afab004c8938bd0459071b1cb8d88 |
|
MD5 | e8a75ef5def1d806c8a5a9517d36257b |
|
BLAKE2b-256 | a9ae651c195f4777f1fc213c8c1153d1f09be1486d174b93e120cd282b748ecf |