Skip to content

Commit

Permalink
chore: updating Remarkable dependency to resolve subdependency DOS vu…
Browse files Browse the repository at this point in the history
…lnerability
  • Loading branch information
kblanfor committed Dec 18, 2019
1 parent 68a369e commit 3e199da
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ module.exports = toc;
*/

function toc(str, options) {
return new utils.Remarkable()
.use(generate(options))
.render(str);
return new utils.Remarkable.Remarkable().use(generate(options)).render(str)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"minimist": "^1.2.0",
"mixin-deep": "^1.1.3",
"object.pick": "^1.2.0",
"remarkable": "^1.7.1",
"remarkable": "^2.0.0",
"repeat-string": "^1.6.1",
"strip-color": "^0.1.0"
},
Expand Down
4 changes: 1 addition & 3 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ function read(fp) {
describe('plugin', function() {
it('should work as a remarkable plugin', function() {
function render(str, options) {
return new utils.Remarkable()
.use(toc.plugin(options))
.render(str);
return new utils.Remarkable.Remarkable().use(toc.plugin(options)).render(str)
}

var actual = render(read('test/fixtures/strip-words.md'), {
Expand Down

0 comments on commit 3e199da

Please sign in to comment.