- Commit
- 8cabf96510bb17f80d0b849f7e97ebe54c779eb7
- Parent
- 5e6a28c965d6b036b413500a070059585ddfdbe9
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Rename unescape -> unescapeBS to avoid confusion with built-in.
My personal build of CMark ✏️
Rename unescape -> unescapeBS to avoid confusion with built-in.
1 file changed, 5 insertions, 5 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | js/stmd.js | 10 | 5 | 5 |
diff --git 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 {