From c772cd9c1b55f46306260977835f8d315275ee94 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 10 Jan 2015 15:29:19 -0800 Subject: Put another regex in a variable. --- js/lib/html.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js') 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; } -- cgit v1.2.3