diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-09-29 23:05:02 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-09-29 23:05:02 -0700 |
commit | 8cabf96510bb17f80d0b849f7e97ebe54c779eb7 (patch) | |
tree | ecc708a0082e1b2e00c64aa671e2926233690726 | |
parent | 5e6a28c965d6b036b413500a070059585ddfdbe9 (diff) |
Rename unescape -> unescapeBS to avoid confusion with built-in.
-rwxr-xr-x | js/stmd.js | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -77,7 +77,7 @@ // UTILITY FUNCTIONS // Replace backslash escapes with literal characters. - var unescape = function(s) { + var unescapeBS = function(s) { return s.replace(reAllEscapedChar, '$1'); }; @@ -478,7 +478,7 @@ var title = this.match(reLinkTitle); if (title) { // chop off quotes from title and unescape: - return unescape(title.substr(1, title.length - 2)); + return unescapeBS(title.substr(1, title.length - 2)); } else { return null; } @@ -489,11 +489,11 @@ var parseLinkDestination = function() { var res = this.match(reLinkDestinationBraces); if (res) { // chop off surrounding <..>: - return encodeURI(unescape(res.substr(1, res.length - 2))); + return encodeURI(unescapeBS(res.substr(1, res.length - 2))); } else { res = this.match(reLinkDestination); if (res !== null) { - return encodeURI(unescape(res)); + return encodeURI(unescapeBS(res)); } else { return null; } @@ -1373,7 +1373,7 @@ case 'FencedCode': // first line becomes info string - block.info = unescape(block.strings[0].trim()); + block.info = unescapeBS(block.strings[0].trim()); if (block.strings.length == 1) { block.string_content = ''; } else { |