Browse Source

Curring for set/configure/enable/disable

pull/14/head
Vitaly Puzrin 10 years ago
parent
commit
fc0a5be2fa
  1. 4
      lib/index.js

4
lib/index.js

@ -68,6 +68,7 @@ function MarkdownIt(presetName, options) {
// //
MarkdownIt.prototype.set = function (options) { MarkdownIt.prototype.set = function (options) {
assign(this.options, options); assign(this.options, options);
return this;
}; };
@ -87,6 +88,7 @@ MarkdownIt.prototype.configure = function (presets) {
} }
}); });
} }
return this;
}; };
@ -96,6 +98,7 @@ MarkdownIt.prototype.enable = function (list) {
[ 'core', 'block', 'inline' ].forEach(function (chain) { [ 'core', 'block', 'inline' ].forEach(function (chain) {
this[chain].ruler.enable(list, true); this[chain].ruler.enable(list, true);
}, this); }, this);
return this;
}; };
@ -105,6 +108,7 @@ MarkdownIt.prototype.disable = function (list) {
[ 'core', 'block', 'inline' ].forEach(function (chain) { [ 'core', 'block', 'inline' ].forEach(function (chain) {
this[chain].ruler.disable(list, true); this[chain].ruler.disable(list, true);
}, this); }, this);
return this;
}; };

Loading…
Cancel
Save