aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-09-29 23:05:02 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-09-29 23:05:02 -0700
commit8cabf96510bb17f80d0b849f7e97ebe54c779eb7 (patch)
treeecc708a0082e1b2e00c64aa671e2926233690726
parent5e6a28c965d6b036b413500a070059585ddfdbe9 (diff)
Rename unescape -> unescapeBS to avoid confusion with built-in.
-rwxr-xr-xjs/stmd.js10
1 files changed, 5 insertions, 5 deletions
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 {