- Commit
- c772cd9c1b55f46306260977835f8d315275ee94
- Parent
- ec18344cf02a03c0c3a2254c72b7efc2d378d71a
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Put another regex in a variable.
My personal build of CMark ✏️
Put another regex in a variable.
1 file changed, 3 insertions, 1 deletion
Status | File Name | N° Changes | Insertions | Deletions |
Modified | js/lib/html.js | 4 | 3 | 1 |
diff --git a/js/lib/html.js b/js/lib/html.js @@ -19,6 +19,8 @@ var tag = function(name, attrs, selfclosing) { return result; }; +var reHtmlTag = /\<[^>]*\>/; + var renderNodes = function(block, options) { var attrs; @@ -32,7 +34,7 @@ var renderNodes = function(block, options) { var grandparent; var out = function(s) { if (disableTags > 0) { - buffer += s.replace(/\<[^>]*\>/g, ''); + buffer += s.replace(reHtmlTag, ''); } else { buffer += s; }