diff options
author | John MacFarlane <[email protected]> | 2014-10-18 17:38:00 -0700 |
---|---|---|
committer | John MacFarlane <[email protected]> | 2014-10-18 17:38:38 -0700 |
commit | efff87ae0da05a94e8416ff090fdfcd5634c36a7 (patch) | |
tree | 6b1218ec94d721a9d16a8e88e78818258d1b21e0 /js/lib/blocks.js | |
parent | d91e106123f0853e6380b5d7c8d856365c9b331a (diff) |
Add unescapeString as method of InlineParser.
Diffstat (limited to 'js/lib/blocks.js')
-rw-r--r-- | js/lib/blocks.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/js/lib/blocks.js b/js/lib/blocks.js index 0a94103..6cedb37 100644 --- a/js/lib/blocks.js +++ b/js/lib/blocks.js @@ -2,7 +2,8 @@ var C_GREATERTHAN = 62; var C_SPACE = 32; var C_OPEN_BRACKET = 91; -var _inlines = require('./inlines'); +var InlineParser = require('./inlines'); +var unescapeString = new InlineParser().unescapeString; // Returns true if string contains only space characters. var isBlank = function(s) { @@ -566,7 +567,7 @@ var finalize = function(block, line_number) { case 'FencedCode': // first line becomes info string - block.info = _inlines.unescapeEntBS(block.strings[0].trim()); + block.info = unescapeString(block.strings[0].trim()); if (block.strings.length == 1) { block.string_content = ''; } else { @@ -658,7 +659,7 @@ function DocParser(){ doc: makeBlock('Document', 1, 1), tip: this.doc, refmap: {}, - inlineParser: new _inlines.InlineParser(), + inlineParser: new InlineParser(), breakOutOfLists: breakOutOfLists, addLine: addLine, addChild: addChild, |