[Pkg-javascript-commits] [node-shell-quote] 79/137: backreferences in negated capture groups don't actually work

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 e189d9d5910c6ecc7d564309ca9e110062f9589e
Author: James Halliday <mail at substack.net>
Date:   Mon Jun 24 04:33:56 2013 -0700

    backreferences in negated capture groups don't actually work
---
 index.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 2b15560..e1283a0 100644
--- a/index.js
+++ b/index.js
@@ -43,7 +43,8 @@ exports.parse = function (s, env) {
 
 function parse (s, env) {
     var chunker = new RegExp([
-        '[^\\s\'"]*([\'"])((\\\\\\1|[^\\1])*?)\\1[^\\s\'"]*', // quotes
+        '[^\\s\'"]*(")((\\\\"|[^"])*?)"[^\\s\'"]*', // double quotes
+        '[^\\s\'"]*(\')((\\\\\'|[^\'])*?)\'[^\\s\'"]*', // single quotes
         '(\\\\[' + META + ']|[^\\s' + META + '])+', // barewords
         '(' + CONTROL + ')' // control chars
     ].join('|'), '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