fix: check options.enable and no-emoji
This commit is contained in:
parent
c95b1331c7
commit
a01582fdce
1 changed files with 4 additions and 2 deletions
6
index.js
6
index.js
|
@ -30,8 +30,10 @@ hexo.extend.tag.register("github_emoji", (args) =>
|
|||
);
|
||||
|
||||
hexo.extend.filter.register("after_post_render", (data) => {
|
||||
if (options.inject !== false && (!options.enable || data["no-emoji"])) {
|
||||
data.content = `<style>${getEmojiStyles()}</style>` + data.content;
|
||||
if (!options.enable || data["no-emoji"]) {
|
||||
if (options.inject !== false) {
|
||||
data.content = `<style>${getEmojiStyles()}</style>` + data.content;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue