[Pkg-javascript-commits] [node-shell-quote] 27/137: better parse recursion to capture the containing quotes

Bastien Roucariès rouca at moszumanska.debian.org
Fri Aug 25 19:19:36 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 84679611fd5843777d3d94f157a7b6efe11097ca
Author: James Halliday <mail at substack.net>
Date:   Sun Apr 14 21:07:31 2013 -0700

    better parse recursion to capture the containing quotes
---
 index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 799f4b4..df95586 100644
--- a/index.js
+++ b/index.js
@@ -33,7 +33,7 @@ exports.parse = function parse (s, env) {
         else return s
             .replace(/(^|[^\\])\$(\w+)/g, getVar)
             .replace(/(^|[^\\])\${(\w+)}/g, getVar)
-            .replace(/(['"])((\\\1|[^\1])*?)\1/, function (_, q, s) {
+            .replace(/(['"])((\\\1|[^\1])*?)\1/, function (s, q) {
                 return parse(s, env);
             })
             .replace(/\\([ "'\\$`(){}!#&*|])/g, '$1')

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