From d1ff82a07c44cb53ab909b61833296f38257eabd Mon Sep 17 00:00:00 2001 From: James Halliday Date: Mon, 13 May 2013 05:05:06 -0700 Subject: [PATCH] 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') ; }