Discord Markdown
I needed to render some Discord chat logs as HTML, and found that the Markdown implementation in Discord isn't quite compliant with Common Markdown as Discord uses a simplified version.
So I wrote this library that allows you to convert a discord message written in the Markdown formatting syntax specified here to html.
Installation
You can install the library from pypi:
pip install discord-markdown
Usage
from discord_markdown.discord_markdown import convert_to_html
text = "_This_ **is** an __example__.\nThis should be a different paragraph."
html = convert_to_html(text)
assert html == '<p><i>This</i> <b>is</b> an <u>example</u>.</p><p>This should be a different paragraph.</p>'
Release files for discord-markdown 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| discord_markdown-0.3.0.tar.gz | 4.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| discord_markdown-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.7 kB
Release files / discord_markdown-0.3.0.tar.gz
| Download URL | discord_markdown-0.3.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
263e46c0826f9d5e741bbdec04662c061ffa30da2758a130f67a10b7616e1d5e
|
|
BLAKE2b-256 checksum How to use checksums |
ad25503d0364b093bfe32f71f68409013914639b17f7ecb0bdfc3dd7c9e68708
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.3 CPython/3.6.9 Linux/5.3.0-7642-generic
|
Release files / discord_markdown-0.3.0-py3-none-any.whl
| Download URL | discord_markdown-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
156e52a3cd0fd9349b1719936d0f4d5d10aee99c3503c78a2bb1ad9813ac44b8
|
|
BLAKE2b-256 checksum How to use checksums |
f5f4a108e8ad29e71881aeb547ec0704575984956acad2d1323e1f2e985870eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.3 CPython/3.6.9 Linux/5.3.0-7642-generic
|