{"name":"markdown-it-emoji","version":"3.1.0","description":"Emoji plugin for markdown-it markdown parser.","keywords":["markdown-it-plugin","markdown-it","markdown","emoji","emojies","emoticon","emoticons"],"repository":{"type":"git","url":"git+https://github.com/markdown-it/markdown-it-emoji.git"},"license":"MIT","main":"dist/index.cjs.js","module":"index.mjs","exports":{".":{"require":"./dist/index.cjs.js","import":"./index.mjs"},"./*":{"require":"./*","import":"./*"}},"scripts":{"lint":"eslint .","build":"rollup -c","test":"npm run lint && npm run build && c8 --exclude dist --exclude test -r text -r html -r lcov mocha","prepublishOnly":"npm run lint && npm run build"},"devDependencies":{"@rollup/plugin-terser":"^0.4.4","c8":"^8.0.1","eslint":"^8.55.0","eslint-config-standard":"^17.1.0","markdown-it":"^13.0.2","markdown-it-testgen":"^0.1.6","mocha":"^10.2.0","rollup":"^4.6.1"},"gitHead":"e30efb3c280298039be0fc2ec77aeab1d3b8596f","_id":"markdown-it-emoji@3.1.0","bugs":{"url":"https://github.com/markdown-it/markdown-it-emoji/issues"},"homepage":"https://github.com/markdown-it/markdown-it-emoji#readme","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-NhmMEH2ywduD4Nty1E8uB5NqfLhAT1VR0dyvoJyStKOqCzbZmVdn/+8wj7zpDsb/fLBikpCPsWwxqKlvMmbz4g==","shasum":"67d9a601b6b2255e7e94d445e4e52e2165c31346","tarball":"http://registry-npm.ywwl.com/markdown-it-emoji/download/markdown-it-emoji-3.1.0.tgz","fileCount":23,"unpackedSize":344311,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB1EeBHNkbnhZ7wri/ymczAAlpvbT7vgEnY+JR5hPZiFAiEA4rIT182IhR/eIXXi63a7ZaORyPVLg3Lto2/YZk+BLco="}],"size":100840,"noattachment":false,"key":"/markdown-it-emoji/-/markdown-it-emoji-3.1.0.tgz"},"_npmUser":{"name":"vitaly","email":"vitaly@rcopen.com"},"directories":{},"maintainers":[{"name":"vitaly","email":"vitaly@rcopen.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/markdown-it-emoji_3.1.0_1784747827229_0.18706461834582688"},"_hasShrinkwrap":false,"readme":"# markdown-it-emoji\n\n[![CI](https://github.com/markdown-it/markdown-it-emoji/actions/workflows/ci.yml/badge.svg)](https://github.com/markdown-it/markdown-it-emoji/actions/workflows/ci.yml)\n[![NPM version](https://img.shields.io/npm/v/markdown-it-emoji.svg?style=flat)](https://www.npmjs.org/package/markdown-it-emoji)\n[![Coverage Status](https://coveralls.io/repos/markdown-it/markdown-it-emoji/badge.svg?branch=master&service=github)](https://coveralls.io/github/markdown-it/markdown-it-emoji?branch=master)\n\n> Plugin for [markdown-it](https://github.com/markdown-it/markdown-it) markdown parser, adding emoji & emoticon syntax support. Also supports emoticons [shortcuts](https://github.com/markdown-it/markdown-it-emoji/blob/master/lib/data/shortcuts.mjs) like `:)`, `:-(`, and others.\n\n__NOTE. v3 changed exports, see below.__\n\n\n## Install\n\n```bash\nnpm install markdown-it-emoji\n```\n\n## Use\n\n### init\n\n```js\n//\n// { full, light, bare } configs available.\n//\n//  full:  includes all available emojis support\n//  light: includes small subset of most useable emojis\n//  bare:  no defaults\n//\n// Also CJS & UMD builds available in `dist/` folder of published package,\n// if your env not supports ESM modules use.\n//\nimport { full as emoji } from 'markdown-it-emoji'\nimport markdownit from 'markdown-it'\n\nconst md = markdownit().use(emoji/* , options */);\n```\n\nOptions are not mandatory:\n\n- __defs__ (Object) - rewrite available emoji definitions\n  - example: `{ name1: char1, name2: char2, ... }`\n- __enabled__ (Array) - disable all emojis except whitelisted\n- __shortcuts__ (Object) - rewrite default shortcuts\n  - example: `{ \"smile\": [ \":)\", \":-)\" ], \"laughing\": \":D\" }`\n\n_Differences in browser._ If you load the script directly into the page without\nusing a package system, the module will add itself globally with the name `markdownitEmoji`.\n\n### change output\n\nBy default, emojis are rendered as appropriate unicode chars. But you can change\nthe renderer function as you wish.\n\nRender as span blocks (for example, to use a custom iconic font):\n\n```js\n// ...\n// initialize\n\nmd.renderer.rules.emoji = function(token, idx) {\n  return '<span class=\"emoji emoji_' + token[idx].markup + '\"></span>';\n};\n```\n\nOr use [twemoji](https://github.com/twitter/twemoji):\n\n```js\n// ...\n// initialize\n\nimport twemoji from 'twemoji'\n\nmd.renderer.rules.emoji = function(token, idx) {\n  return twemoji.parse(token[idx].content);\n};\n```\n\n__NB 1__. Read [twemoji docs](https://github.com/twitter/twemoji#string-parsing)!\nIn case you need more options to change image size & type.\n\n__NB 2__. When using twemoji you can make image height match the line height with this\nstyle:\n\n```css\n.emoji {\n  height: 1.2em;\n}\n```\n\n### In your markdown file\n\n```md\nHello from mars :satellite:\n```\n\nbecomes\n\n```\nHello from mars 📡\n```\n","publish_time":1784747827370,"_cnpm_publish_time":1784747827370,"dist-tags":{"latest":"3.1.0"}}