1
1
'use strict' ;
2
2
3
- var hljs = require ( 'highlight.js' ) ;
4
- var utils = require ( 'handlebars-utils' ) ;
5
- var Remarkable = require ( 'remarkable' ) ;
6
- var defaults = { html : true , breaks : true , highlight : highlight } ;
3
+ const hljs = require ( 'highlight.js' ) ;
4
+ const utils = require ( 'handlebars-utils' ) ;
5
+ const Remarkable = require ( 'remarkable' ) ;
6
+ const defaults = { html : true , breaks : true , highlight : highlight } ;
7
7
8
8
module . exports = function ( config ) {
9
9
if ( typeof config === 'string' || utils . isOptions ( config ) ) {
@@ -22,16 +22,16 @@ module.exports = function(config) {
22
22
locals = { } ;
23
23
}
24
24
25
- var ctx = utils . context ( this , locals , options ) ;
26
- var opts = utils . options ( this , locals , options ) ;
25
+ const ctx = utils . context ( this , locals , options ) ;
26
+ let opts = utils . options ( this , locals , options ) ;
27
27
opts = Object . assign ( { } , defaults , config , opts ) ;
28
28
29
29
if ( opts . hasOwnProperty ( 'lang' ) ) {
30
30
opts . langPrefix = opts . lang ;
31
31
}
32
32
33
- var md = new Remarkable ( opts ) ;
34
- var val = utils . value ( str , ctx , options ) ;
33
+ const md = new Remarkable ( opts ) ;
34
+ const val = utils . value ( str , ctx , options ) ;
35
35
return md . render ( val ) ;
36
36
}
37
37
return markdown ;
0 commit comments