Skip to main content

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)

Source distribution for discord-markdown 0.3.0
File Size Uploaded
discord_markdown-0.3.0.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for discord-markdown 0.3.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

This release

0.3.0 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page