File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 1
1
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
+ } ) ;
3
8
4
9
module . exports = function ( hbs ) {
5
10
@@ -11,15 +16,7 @@ module.exports = function (hbs) {
11
16
12
17
hbs . registerHelper ( 'markdown' , function ( block ) {
13
18
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 ) ;
23
20
24
21
} ) ;
25
22
Original file line number Diff line number Diff line change 11
11
"dox" : " 0.6.1" ,
12
12
"handlebars" : " 2.0.0" ,
13
13
"highlight.js" : " 8.4.0" ,
14
- "marked " : " 0.3.3 " ,
14
+ "markdown-it " : " 3.0.4 " ,
15
15
"promise" : " 6.1.0" ,
16
16
"sqlite3" : " 3.0.4" ,
17
17
"temp" : " 0.8.1"
27
27
" html" ,
28
28
" bootstrap" ,
29
29
" markdown" ,
30
- " dash"
30
+ " dash" ,
31
+ " dox"
31
32
],
32
33
"authors" : [
33
34
{
You can’t perform that action at this time.
0 commit comments