Remark markdown transformer to replace :emoji: in text
JavaScript
Latest commit b4e89a2 Nov 17, 2016 @rhysd 1.1.1
Permalink
Failed to load latest commit information.
.eslintrc.json implement visitor Oct 1, 2016
.gitignore implement visitor Oct 1, 2016
.travis.yml run CI on Travis CI Oct 1, 2016
LICENSE
README.md
index.js Add dashes to Regex used to detect emoji Nov 18, 2016
index_test.js Add test cases for dashed emoji Nov 18, 2016
package.json

README.md

remark-emoji

Build Status

This is a remark plugin to replace :emoji: to real UTF-8 emojis in text.

Usage

remark().use(emoji [, options]);
const remark = require('remark');
const emoji = require('remark-emoji');

const doc = 'Emojis in this text will be replaced: :dog: :+1:';
console.log(remark().use(emoji).process(doc).contents);
// => Emojis in this text will be replaced: 🐶 👍

Options

options.padSpaceAfter

Setting to true means that an extra whitespace is added after emoji. This is useful when browser handle emojis with half character length and following character is hidden. Default value is false.

License

Distributed under the MIT License.