mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-19 18:25:51 +10:00
5 lines
190 B
JavaScript
5 lines
190 B
JavaScript
module.exports = str => {
|
|
const emojiData = require('markdown-it-emoji/lib/data/full.json')
|
|
return String(str).replace(/:(.+?):/g, (placeholder, key) => emojiData[key] || placeholder)
|
|
}
|