Skip to content

Commit

Permalink
Use diskshima/marked and use Qiita emoji.
Browse files Browse the repository at this point in the history
  • Loading branch information
diskshima committed Nov 16, 2014
1 parent 6b9eabe commit f86241b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion gfms.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,15 @@ function renderWithMarked(contents, cb) { // cb(err, res)
tables: true,
smartLists: true,
breaks: true,
emoji: function (emoji) {
var imageUrl = "https://cdn.qiita.com/emoji/" + encodeURIComponent(emoji) + ".png";
return '<img src="' + imageUrl + '" alt="' + emoji + '" width="20" height="20"></img>';
},
highlight: function (code, lang) {
if (lang) {
return highlight.highlight(lang, code, true).value;
} else {
code;
return code;
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"express": "*",
"marked": "latest",
"marked": "diskshima/marked",
"highlight.js": "latest",
"jade": "*",
"laeh2": "*",
Expand Down

0 comments on commit f86241b

Please sign in to comment.