Skip to content

Commit

Permalink
now just 2 tests failing with a subtle regex reordering
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Apr 15, 2013
1 parent 46e6cf4 commit 5448a02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -31,9 +31,9 @@ exports.parse = function (s, env) {

function interpolate (s) {
return s
.replace(/\\([ "'\\$`(){}!#&*|])/g, '$1')
.replace(/(^|[^\\])\$(\w+)/g, getVar)
.replace(/(^|[^\\])\${(\w+)}/g, getVar)
.replace(/\\([ "'\\$`(){}!#&*|])/g, '$1')
;
}
function getVar (_, pre, key) {
Expand Down

0 comments on commit 5448a02

Please sign in to comment.