Skip to content

Commit 1a69f1b

Browse files
committed
fix: updating Remarkable dependency to resolve subdependency DOS vulnerability
1 parent 68a369e commit 1a69f1b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ module.exports = toc;
2626
*/
2727

2828
function toc(str, options) {
29-
return new utils.Remarkable()
29+
var Remarkable = utils.Remarkable.Remarkable;
30+
return new Remarkable()
3031
.use(generate(options))
3132
.render(str);
3233
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"minimist": "^1.2.0",
5757
"mixin-deep": "^1.1.3",
5858
"object.pick": "^1.2.0",
59-
"remarkable": "^1.7.1",
59+
"remarkable": "^2.0.0",
6060
"repeat-string": "^1.6.1",
6161
"strip-color": "^0.1.0"
6262
},

test/test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ function read(fp) {
1818
describe('plugin', function() {
1919
it('should work as a remarkable plugin', function() {
2020
function render(str, options) {
21-
return new utils.Remarkable()
21+
var Remarkable = utils.Remarkable.Remarkable;
22+
return new Remarkable()
2223
.use(toc.plugin(options))
2324
.render(str);
2425
}

0 commit comments

Comments
 (0)