Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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