diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-10 15:29:19 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-10 15:29:19 -0800 |
commit | c772cd9c1b55f46306260977835f8d315275ee94 (patch) | |
tree | f5ee22d2818095f2f9a2a3bfa7f1821a20f12d26 /js | |
parent | ec18344cf02a03c0c3a2254c72b7efc2d378d71a (diff) |
Put another regex in a variable.
Diffstat (limited to 'js')
-rw-r--r-- | js/lib/html.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/js/lib/html.js b/js/lib/html.js index 12a8db9..928964e 100644 --- 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; } |