[Pkg-javascript-commits] [node-shell-quote] 75/137: passing all tests

Bastien Roucariès rouca at moszumanska.debian.org
Fri Aug 25 19:19:41 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 44177e3dcbd96dfa331483eba0abbfb0291c130f
Author: James Halliday <mail at substack.net>
Date:   Wed May 15 11:35:05 2013 -0700

    passing all tests
---
 index.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index 2209eea..2b15560 100644
--- a/index.js
+++ b/index.js
@@ -43,7 +43,7 @@ exports.parse = function (s, env) {
 
 function parse (s, env) {
     var chunker = new RegExp([
-        '([\'"])((\\\\\\1|[^\\1])*?)\\1', // quotes
+        '[^\\s\'"]*([\'"])((\\\\\\1|[^\\1])*?)\\1[^\\s\'"]*', // quotes
         '(\\\\[' + META + ']|[^\\s' + META + '])+', // barewords
         '(' + CONTROL + ')' // control chars
     ].join('|'), 'g');
@@ -57,7 +57,7 @@ function parse (s, env) {
                 .replace(/\\(["'\\$`(){}!#&*|])/g, '$1')
             ;
         }
-        else if (/^"/.test(s) && typeof env === 'function') {
+        else if (/^([^"']*)"/.test(s) && typeof env === 'function') {
             return s.replace(/^"|"$/g, '')
                 .replace(/(^|[^\\])\$(\w+|[*@#?$!0_-])/g, getVar)
                 .replace(/(^|[^\\])\${(\w+|[*@#?$!0_-])}/g, getVar)

-- 
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