[Pkg-javascript-commits] [node-shell-quote] 10/137: fix for escaped spaces
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Aug 25 19:19:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-shell-quote.
commit 669b61610aad3e6f47e8c043e1635dcc4b5ce375
Author: James Halliday <mail at substack.net>
Date: Fri May 18 11:23:24 2012 -0700
fix for escaped spaces
---
index.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/index.js b/index.js
index fdbbf67..9494c31 100644
--- a/index.js
+++ b/index.js
@@ -13,7 +13,7 @@ exports.quote = function (xs) {
};
exports.parse = function (s) {
- return s.match(/(['"])((\\\1|[^\1])*?)\1|\S+/g)
+ return s.match(/(['"])((\\\1|[^\1])*?)\1|(\\ |\S)+/g)
.map(function (s) {
if (/^'/.test(s)) {
return s
@@ -27,7 +27,7 @@ exports.parse = function (s) {
.replace(/\\(["'\\$`(){}!#&*|])/g, '$1');
;
}
- else return s;
+ else return s.replace(/\\ /g, ' ');
})
;
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-shell-quote.git
More information about the Pkg-javascript-commits
mailing list