Skip to content

stamat/marked-github-emoji

Repository files navigation

marked-github-emoji npm version

A lightweight, zero-dependency marked extension to parse GitHub-style shortcodes into native system emojis.

Cause I just want emoji shortcodes that I'm used to in my MDs...

emojis.json emoji dictionary is generated directly from https://api.github.com/emojis and https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json using the npm run generate-dict script.

Support for legendary :shipit:, :suspect:, :trollface:, :octocat:, :atom: (my good old friend 😢), :electron:, etc... that get rendered as an image.

Installation

npm install marked-github-emoji

Usage

import { marked } from "marked";
import { markedGithubEmoji } from "marked-github-emoji";

marked.use(markedGithubEmoji());

const html = marked.parse("Hello :rocket: :+1:");
// <p>Hello 🚀 👍</p>

Hi! 👋 Bye! 👋

License

MIT

About

marked extension to parse GitHub-style shortcodes into native system emojis

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors