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.0.1.tar.gz
(20.1 kB
view details)
Built Distribution
File details
Details for the file mdit-py-emoji-0.0.1.tar.gz
.
File metadata
- Download URL: mdit-py-emoji-0.0.1.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.1.4 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b60a0fc1eb3d97fa63f7c332b1c36fdacccacec54aba7a9c120c3e2bf3d0282c |
|
MD5 | 4b955185fb0254977630df47f790a8e1 |
|
BLAKE2b-256 | f09f232ddbb15443c5f7f949ad2c400417655c23d46a2886f91c6b717a7b57d1 |
File details
Details for the file mdit_py_emoji-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: mdit_py_emoji-0.0.1-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.1.4 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 417cc5175219e9b64aa8b53152d6367974f085ba4f451133f8d9820fe678c2be |
|
MD5 | cb1e7b0a69a2b3f0fa19fbe3adb41826 |
|
BLAKE2b-256 | 3a1c35dd24d585b9553a38264e1a0bf4dd82515c11f3358a4f56426f5a47bcc3 |