Skip to content

Commit

Permalink
expand more escape sequences in parse()
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed May 18, 2012
1 parent 69c0f85 commit 8b2224c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ exports.parse = function (s) {
if (/^'/.test(s)) {
return s
.replace(/^'|'$/g, '')
.replace(/\\(['\\])/g, '$1')
.replace(/\\(["'\\$`(){}!#&*|])/g, '$1');
;
}
else if (/^"/.test(s)) {
return s
.replace(/^"|"$/g, '')
.replace(/\\(["\\])/g, '$1')
.replace(/\\(["'\\$`(){}!#&*|])/g, '$1');
;
}
else return s;
Expand Down

0 comments on commit 8b2224c

Please sign in to comment.