summaryrefslogtreecommitdiff
path: root/js/lib/blocks.js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-11 23:01:14 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-11 23:01:14 -0800
commitffbca7b85198c2d0efd71b95ef4a1fa693578af0 (patch)
treec08e532e69dbf4640121931a76c53ba63847ab69 /js/lib/blocks.js
parenta0cbcefe82a6bff0a9b44550e22244d6d5d727c0 (diff)
Factored out unescapeString into new module, js/common.js.
This is used in both blocks.js and inlines.js.
Diffstat (limited to 'js/lib/blocks.js')
-rw-r--r--js/lib/blocks.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/js/lib/blocks.js b/js/lib/blocks.js
index 9f46a3c..d184b51 100644
--- a/js/lib/blocks.js
+++ b/js/lib/blocks.js
@@ -1,4 +1,5 @@
var Node = require('./node');
+var unescapeString = require('./common').unescapeString;
var C_GREATERTHAN = 62;
var C_NEWLINE = 10;
@@ -7,8 +8,6 @@ var C_OPEN_BRACKET = 91;
var InlineParser = require('./inlines');
-var unescapeString = new InlineParser().unescapeString;
-
var BLOCKTAGNAME = '(?:article|header|aside|hgroup|iframe|blockquote|hr|body|li|map|button|object|canvas|ol|caption|output|col|p|colgroup|pre|dd|progress|div|section|dl|table|td|dt|tbody|embed|textarea|fieldset|tfoot|figcaption|th|figure|thead|footer|footer|tr|form|ul|h1|h2|h3|h4|h5|h6|video|script|style)';
var HTMLBLOCKOPEN = "<(?:" + BLOCKTAGNAME + "[\\s/>]" + "|" +