diff --git a/index.js b/index.js index 90cb8be..30641bf 100644 --- a/index.js +++ b/index.js @@ -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) } /** diff --git a/package.json b/package.json index 2c870b4..5d9fcd6 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/test/test.js b/test/test.js index e93e41b..a9f995e 100644 --- a/test/test.js +++ b/test/test.js @@ -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'), {