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
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.0.tar.gz
(20.9 kB
view details)
Built Distribution
File details
Details for the file mdit-py-emoji-0.1.0.tar.gz
.
File metadata
- Download URL: mdit-py-emoji-0.1.0.tar.gz
- Upload date:
- Size: 20.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96778e7cfc5c22c4029a03068f85d904867b670866721fc9c45b65fe8ecc02a4 |
|
MD5 | 8978bbd14cc11037ff70ef23305ed3be |
|
BLAKE2b-256 | d20fec00dfc04e7802f44fbed3741c3e763e127029d69e69fbbe9ba4e9d20465 |
File details
Details for the file mdit_py_emoji-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: mdit_py_emoji-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64f94402a596759aadaf3cb5ab5dba1e7a27f76b53702377869fb617b818d1e3 |
|
MD5 | fce64690ae0c1ee557358e33c4478d40 |
|
BLAKE2b-256 | 890054d1204f480eeaa43885a1ef83246d877b7bbd8cf7955af2c8731a280bb8 |