{"name":"markdown-it-emoji","version":"1.3.0","description":"Emoji plugin for markdown-it markdown parser.","keywords":["markdown-it-plugin","markdown-it","markdown","emoji","emojies","emoticon","emoticons"],"homepage":"https://github.com/markdown-it/markdown-it-emoji","repository":{"type":"git","url":"git://github.com/markdown-it/markdown-it-emoji.git"},"bugs":{"url":"https://github.com/markdown-it/markdown-it-emoji/issues"},"license":"MIT","main":"index.js","scripts":{"test":"make test"},"files":["index.js","light.js","lib/","dist/"],"devDependencies":{"browserify":"*","coveralls":"^2.11.2","eslint":"^3.7.0","istanbul":"*","lodash":"^4.16.2","markdown-it":"^6.0.0","markdown-it-testgen":"~0.1.0","mocha":"*","request":"*","uglify-js":"*"},"gitHead":"b274a1a7a4dc902a300e27f176eb8a0970fde925","_id":"markdown-it-emoji@1.3.0","_shasum":"903ae1a9968c3f17d4e142f115d4ec575e56d2cb","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"vitaly","email":"vitaly@rcdesign.ru"},"maintainers":[{"name":"vitaly","email":"vitaly@rcdesign.ru"}],"dist":{"shasum":"903ae1a9968c3f17d4e142f115d4ec575e56d2cb","tarball":"http://registry-npm.ywwl.com/markdown-it-emoji/download/markdown-it-emoji-1.3.0.tgz","integrity":"sha512-KbV3s1fkaMu1nWiP+CgmduTpyPELYqE1w38Jf/G5ufBNygfp4b8JinP5C4ZSG44e0Mm3vE6ea6uHaGvQ+T7NDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFq3GMRmltR9v7JuVFb85fA1IRcPfN7zv8wRPUYvkbIwIhAIf4WLSVGYWZFUVu8G/MQfbVExfidNUf/AqDE/sLHnYl"}],"size":50321,"noattachment":false,"key":"/markdown-it-emoji/-/markdown-it-emoji-1.3.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/markdown-it-emoji-1.3.0.tgz_1475586823231_0.7962260041385889"},"directories":{},"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.js) like `:)`, `:-(`, and others.\n\n__NOTE. v3 changed exports, see below.__\n\n\n## Install\n\n```bash\nnpm install i 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":1475586825245,"_cnpm_publish_time":1475586825245,"dist-tags":{"latest":"3.1.0"}}