Skip to content

Commit 3251530

Browse files
committed
fix: Update js syntax in index.js
1 parent e256a67 commit 3251530

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
22

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 };
77

88
module.exports = function(config) {
99
if (typeof config === 'string' || utils.isOptions(config)) {
@@ -22,16 +22,16 @@ module.exports = function(config) {
2222
locals = {};
2323
}
2424

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);
2727
opts = Object.assign({}, defaults, config, opts);
2828

2929
if (opts.hasOwnProperty('lang')) {
3030
opts.langPrefix = opts.lang;
3131
}
3232

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);
3535
return md.render(val);
3636
}
3737
return markdown;

0 commit comments

Comments
 (0)