remark-gemoji
remark plugin to turn gemoji shortcodes (:+1:) into emoji
(👍).
Note!
This plugin is ready for the new parser in remark
(micromark,
see remarkjs/remark#536).
As remark no longer supports “pedantic” mode, this plugin is no longer needed.
Hence, this plugin is rewritten to be useful again: it now maps gemoji
shortcodes to emoji.
This new plugin works with old and new remark.
Install
npm:
npm install remark-gemojiUse
Say we have the following file, example.md:
Thumbs up: :+1:, thumbs down: :-1:.
Families: :family_man_man_boy_boy:
Long flags: :wales:, :scotland:, :england:.And our script, example.js, looks as follows:
var vfile = require('to-vfile')
var report = require('vfile-reporter')
var unified = require('unified')
var parse = require('remark-parse')
var gemoji = require('remark-gemoji')
var stringify = require('remark-stringify')
unified()
.use(parse)
.use(gemoji)
.use(stringify)
.process(vfile.readSync('example.md'), function (err, file) {
console.error(report(err || file))
console.log(String(file))
})Now, running node example yields:
example.md: no issues found
Thumbs up: 👍, thumbs down: 👎.
Families: 👨👨👦👦
Long flags: 🏴, 🏴, 🏴.API
remark().use(gemoji)
Plugin to turn Gemoji shortcodes into emoji.
Security
Use of remark-gemoji does not involve rehype
(hast) or user content so there are no openings for
cross-site scripting (XSS) attacks.
Related
remark-gfm— GitHub Flavored Markdownremark-github— Auto-link references like in GitHub issues, PRs, and commentsremark-footnotes— Footnotesremark-frontmatter— Frontmatter (YAML, TOML, and more) supportremark-math— Math
Contribute
See contributing.md in remarkjs/.github for ways
to get started.
See support.md for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
