Emoji shortcode support for
mdast2docx
This plugin adds support for emoji shortcodes (e.g., :smile:, :rocket:) in your Markdown-to-DOCX conversion pipeline. It replaces recognized emoji shortcodes with their corresponding Unicode characters during the MDAST transformation.
- Converts emoji shortcodes to Unicode emojis (e.g.,
:tada:β π) - Compatible with
@m2d/core - Works seamlessly within the
mdast2docxplugin ecosystem - Easy to integrate and lightweight
pnpm install @m2d/listor
yarn add @m2d/listor
npm add @m2d/listThis plugin scans all text nodes for emoji shortcodes (e.g., :fire:, :sparkles:) and replaces them with matching Unicode emojis using a predefined emoji JSON mapping.
It uses the GitHub-style emoji shortcodes and more β if a shortcode is not recognized, it will remain unchanged.
# Clone and install dependencies
git clone https://github.com/md2docx/emoji-plugin
cd emoji-plugin
npm install
# Build / Test / Dev
npm run buildLicensed under the MPL-2.0 License.
If you find this useful:
- β Star mdast2docx on GitHub
- β€οΈ Consider sponsoring
Made with π by Mayank Kumar Chaudhari