Skip to content

Commit

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

function toc(str, options) {
return new utils.Remarkable()
var Remarkable = utils.Remarkable.Remarkable;
return new 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
3 changes: 2 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ function read(fp) {
describe('plugin', function() {
it('should work as a remarkable plugin', function() {
function render(str, options) {
return new utils.Remarkable()
var Remarkable = utils.Remarkable.Remarkable;
return new Remarkable()
.use(toc.plugin(options))
.render(str);
}
Expand Down

0 comments on commit 1a69f1b

Please sign in to comment.