Browse Source

Pass any number of options to plugin

pull/24/head
Vitaly Puzrin 10 years ago
parent
commit
f6b926b11b
  1. 5
      lib/index.js

5
lib/index.js

@ -332,8 +332,9 @@ MarkdownIt.prototype.disable = function (list) {
* .use(require('makkdown-it-emoji'));
* ```
**/
MarkdownIt.prototype.use = function (plugin, options) {
plugin(this, options);
MarkdownIt.prototype.use = function (plugin /*, options, ... */) {
var args = [ this ].concat(Array.prototype.slice.call(arguments, 1));
plugin.apply(plugin, args);
return this;
};

Loading…
Cancel
Save