Skip to content
This repository was archived by the owner on Mar 14, 2023. It is now read-only.

Commit 5fa212d

Browse files
author
Bernhard Grünewaldt
committed
fix
1 parent 5c5e076 commit 5fa212d

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ module.exports = {
1212
blocks: { },
1313

1414
hooks: {
15-
"page": function(page) {
16-
page.content = page.content.replace(":white_check_mark:", "FOO");
17-
return page;
18-
}
15+
"page:before": function(page) {
16+
/*page.content = page.content.replace(/:white_check_mark:/g, "FOO");*/
17+
var emojify = require("emojify.js");
18+
page.content = emojify.replace(page.content);
19+
return page;
20+
}
1921
}
2022
};

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gitbook-plugin-advanced-emoji",
33
"description": "Shows the common emojis used on GitHub",
44
"main": "index.js",
5-
"version": "0.0.3",
5+
"version": "0.0.4",
66
"engines": {
77
"gitbook": ">=2.5.0"
88
},
@@ -23,5 +23,8 @@
2323
"license": "Apache 2",
2424
"bugs": {
2525
"url": "https://github.com/codeclou/gitbook-plugin-advanced-emoji/issues"
26+
},
27+
"dependencies": {
28+
"emojify.js": "^1.1.0"
2629
}
2730
}

0 commit comments

Comments
 (0)