[Pkg-javascript-commits] [node-shell-quote] 61/137: add the special vars to the replace regex but the chunker breaks on them

Bastien Roucariès rouca at moszumanska.debian.org
Fri Aug 25 19:19:39 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 d1ff82a07c44cb53ab909b61833296f38257eabd
Author: James Halliday <mail at substack.net>
Date:   Mon May 13 05:05:06 2013 -0700

    add the special vars to the replace regex but the chunker breaks on them
---
 index.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index dd8103b..9f3685c 100644
--- a/index.js
+++ b/index.js
@@ -39,8 +39,8 @@ exports.parse = function parse (s, env) {
         else if (/^"/.test(s)) {
             return s
                 .replace(/^"|"$/g, '')
-                .replace(/(^|[^\\])\$(\w+)/g, getVar)
-                .replace(/(^|[^\\])\${(\w+)}/g, getVar)
+                .replace(/(^|[^\\])\$(\w+|[*@#?$!0_-])/g, getVar)
+                .replace(/(^|[^\\])\${(\w+|[*@#?$!0_-])}/g, getVar)
                 .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