There was an error while loading. Please reload this page.
1 parent 8cdf27e commit 9d522d5Copy full SHA for 9d522d5
src/plugins/emoji.js
@@ -1,4 +1,18 @@
1
+import emojiData from '../core/render/emojify-data';
2
+
3
// Deprecation notice
4
if (window && window.console) {
5
console.info('Docsify emoji plugin has been deprecated as of v4.13');
6
}
7
8
+// Emoji from GitHub API
9
+// https://api.github.com/emojis
10
+window.emojify = function (match, $1) {
11
+ return Object.prototype.hasOwnProperty.call(emojiData, $1) === false
12
+ ? match
13
+ : '<img class="emoji" src="https://github.githubassets.com/images/icons/emoji/' +
14
+ emojiData[$1] +
15
+ '.png" alt="' +
16
+ $1 +
17
+ '" />';
18
+};
0 commit comments