Emoji plugin for markdown-it-py.
Project description
mdit-py-emoji
Emoji plugin for markdown-it-py. Ported from https://github.com/markdown-it/markdown-it-emoji
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.
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 Distribution
mdit-py-emoji-0.1.1.tar.gz
(21.0 kB
view details)
Built Distribution
File details
Details for the file mdit-py-emoji-0.1.1.tar.gz
.
File metadata
- Download URL: mdit-py-emoji-0.1.1.tar.gz
- Upload date:
- Size: 21.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d08f2cfc0c512f879fe905c7a572ca55590ea359951825fc2073967d3b9daef |
|
MD5 | 3199649705add97124c272b52559e92c |
|
BLAKE2b-256 | 0df2093ded924d3b706e2f86a74367f240d032ad801c0fc5c21261dbb330ea88 |
File details
Details for the file mdit_py_emoji-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: mdit_py_emoji-0.1.1-py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59f9fef016eeffbabc1ca524d765ce3f5b1aceb4b5320c46cf6ee120a52371b6 |
|
MD5 | 24233a1c6cb94bb3259b4da7889ac0e4 |
|
BLAKE2b-256 | d558824f2fcb66391d9d88888d91deb4a923109bca734de9c0ef0939c9abc151 |