mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
* Update linting configuration (eslint, prettier) * Fix lint issues following eslint prettier update * Change ESLint config to allow boolean coercion * Switch to default import name per docs * Fix suppression of error details * Update JSDoc comments * Update waiForFunctin to provide error details --------- Co-authored-by: Koy Zhuang <koy@ko8e24.top>
15 lines
437 B
JavaScript
15 lines
437 B
JavaScript
import emojiData from '../core/render/emoji-data.js';
|
|
|
|
// Deprecation notice
|
|
if (window && window.console) {
|
|
// eslint-disable-next-line no-console
|
|
console.info('Docsify emoji plugin has been deprecated as of v4.13');
|
|
}
|
|
|
|
// Emoji from GitHub API
|
|
window.emojify = function (match, $1) {
|
|
return $1 in emojiData.data
|
|
? /* html */ `<img src="${emojiData.baseURL}${emojiData.data[$1]}" alt="${$1}" class="emoji" />`
|
|
: match;
|
|
};
|