@hackmd/markdown-it-regexp
Advanced tools
+9
-1
@@ -29,3 +29,3 @@ /*! | ||
| function Plugin(regexp, replacer) { | ||
| function Plugin(regexp, replacer, opts) { | ||
| // return value should be a callable function | ||
@@ -51,2 +51,4 @@ // with strictly defined options passed by markdown-it | ||
| self.opts = opts | ||
| // this plugin can be inserted multiple times, | ||
@@ -74,2 +76,8 @@ // so we're generating unique name for it | ||
| if (this.opts && typeof this.opts.shouldParse === 'function') { | ||
| if (!this.opts.shouldParse(state)) { | ||
| return false | ||
| } | ||
| } | ||
| if (state.pending) { | ||
@@ -76,0 +84,0 @@ state.pushPending(); |
+1
-1
| { | ||
| "name": "@hackmd/markdown-it-regexp", | ||
| "version": "0.4.0", | ||
| "version": "0.4.1", | ||
| "description": "plugin that makes regexp replacement simple", | ||
@@ -5,0 +5,0 @@ "author": { |
5021
3.36%95
6.74%