From 8cabf96510bb17f80d0b849f7e97ebe54c779eb7 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 29 Sep 2014 23:05:02 -0700 Subject: Rename unescape -> unescapeBS to avoid confusion with built-in. --- js/stmd.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/js/stmd.js b/js/stmd.js index 30eceb2..97120ed 100755 --- a/js/stmd.js +++ b/js/stmd.js @@ -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 { -- cgit v1.2.3