Skip to content

Commit 5d168cc

Browse files
committed
Switched from marked to markdown-it.
1 parent 96a80e1 commit 5d168cc

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

lib/helpers.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
var hljs = require('highlight.js'),
2-
marked = require('marked');
2+
markdown = require('markdown-it')({
3+
html: true,
4+
highlight: function (code) {
5+
return hljs.highlight('javascript', code).value;
6+
}
7+
});
38

49
module.exports = function (hbs) {
510

@@ -11,15 +16,7 @@ module.exports = function (hbs) {
1116

1217
hbs.registerHelper('markdown', function (block) {
1318

14-
return marked(block, {
15-
16-
highlight: function (code) {
17-
18-
return hljs.highlight('javascript', code).value;
19-
20-
}
21-
22-
});
19+
return markdown.render(block);
2320

2421
});
2522

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dox": "0.6.1",
1212
"handlebars": "2.0.0",
1313
"highlight.js": "8.4.0",
14-
"marked": "0.3.3",
14+
"markdown-it": "3.0.4",
1515
"promise": "6.1.0",
1616
"sqlite3": "3.0.4",
1717
"temp": "0.8.1"
@@ -27,7 +27,8 @@
2727
"html",
2828
"bootstrap",
2929
"markdown",
30-
"dash"
30+
"dash",
31+
"dox"
3132
],
3233
"authors": [
3334
{

0 commit comments

Comments
 (0)