Skip to content

Commit 3e199da

Browse files
committed
chore: updating Remarkable dependency to resolve subdependency DOS vulnerability
1 parent 68a369e commit 3e199da

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ module.exports = toc;
2626
*/
2727

2828
function toc(str, options) {
29-
return new utils.Remarkable()
30-
.use(generate(options))
31-
.render(str);
29+
return new utils.Remarkable.Remarkable().use(generate(options)).render(str)
3230
}
3331

3432
/**

package.json

+1-1
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

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ 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()
22-
.use(toc.plugin(options))
23-
.render(str);
21+
return new utils.Remarkable.Remarkable().use(toc.plugin(options)).render(str)
2422
}
2523

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

0 commit comments

Comments
 (0)