Skip to main content

mdit-py-emoji

Emoji plugin for markdown-it-py. Ported from https://github.com/markdown-it/markdown-it-emoji

PyPI Python Version Code style: black Imports: isort License pdm-managed codecov

Installation

Choose your favorite!

pip install mdit-py-emoji
pdm add mdit-py-emoji
poetry add mdit-py-emoji

Usage

Use it just like other plugins!

from markdown_it import MarkdownIt
from mdit_py_emoji import emoji_plugin

md = MarkdownIt().use(emoji_plugin)

print(md.renderInline(":star: mdit-py-emoji! :star:"))
# ⭐ mdit-py-emoji! ⭐
print(md.renderInline("Is shortcut supported too :/? :white_check_mark:"))
# Is shortcut supported too 😕? ✅

Customization

Pass defs and shortcuts and that's it!

from markdown_it import MarkdownIt
from mdit_py_emoji import emoji_plugin

md = MarkdownIt().use(
    emoji_plugin,
    shortcuts={
        "arrow_up": [":up_arrow:", ":up_arr:"],
        "arrow_down": [":down_arrow:", ":down_arr:"],
    },
)  # Some tricks like `false = False`
print(md.renderInline(":down_arr: Go Down :down_arrow:"))
# ⬇️ Go Down ⬇️

Wondering about the defaults? Check data.py !

Note: twemoji shortcuts are enabled by default. pass shortcuts={} to disable it.

License

This project is licensed under MIT License.

Release files for mdit-py-emoji 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mdit-py-emoji 0.1.1
File Size Uploaded
mdit-py-emoji-0.1.1.tar.gz 21.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mdit-py-emoji 0.1.1
File Interpreter ABI Platform
mdit_py_emoji-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 41.8 kB

Release files / mdit-py-emoji-0.1.1.tar.gz

Download URL mdit-py-emoji-0.1.1.tar.gz
Size 21.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1d08f2cfc0c512f879fe905c7a572ca55590ea359951825fc2073967d3b9daef
BLAKE2b-256 checksum
How to use checksums
0df2093ded924d3b706e2f86a74367f240d032ad801c0fc5c21261dbb330ea88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / mdit_py_emoji-0.1.1-py3-none-any.whl

Download URL mdit_py_emoji-0.1.1-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59f9fef016eeffbabc1ca524d765ce3f5b1aceb4b5320c46cf6ee120a52371b6
BLAKE2b-256 checksum
How to use checksums
d558824f2fcb66391d9d88888d91deb4a923109bca734de9c0ef0939c9abc151
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.1

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