summaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-10 15:29:19 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-10 15:29:19 -0800
commitc772cd9c1b55f46306260977835f8d315275ee94 (patch)
treef5ee22d2818095f2f9a2a3bfa7f1821a20f12d26 /js/lib
parentec18344cf02a03c0c3a2254c72b7efc2d378d71a (diff)
Put another regex in a variable.
Diffstat (limited to 'js/lib')
-rw-r--r--js/lib/html.js4
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;
}