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>'

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

discord_markdown-0.3.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

discord_markdown-0.3.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file discord_markdown-0.3.0.tar.gz.

File metadata

  • Download URL: discord_markdown-0.3.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.3 CPython/3.6.9 Linux/5.3.0-7642-generic

File hashes

Hashes for discord_markdown-0.3.0.tar.gz
Algorithm Hash digest
SHA256 263e46c0826f9d5e741bbdec04662c061ffa30da2758a130f67a10b7616e1d5e
MD5 fba843c6b17f45969bb3e772f198296d
BLAKE2b-256 ad25503d0364b093bfe32f71f68409013914639b17f7ecb0bdfc3dd7c9e68708

See more details on using hashes here.

File details

Details for the file discord_markdown-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: discord_markdown-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.3 CPython/3.6.9 Linux/5.3.0-7642-generic

File hashes

Hashes for discord_markdown-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 156e52a3cd0fd9349b1719936d0f4d5d10aee99c3503c78a2bb1ad9813ac44b8
MD5 59e4903a2313b3a088cfd524c5f4aaae
BLAKE2b-256 f5f4a108e8ad29e71881aeb547ec0704575984956acad2d1323e1f2e985870eb

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

This release

0.3.0 This release

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page