Skip to content

Commit

Permalink
backreferences in negated capture groups don't actually work
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jun 24, 2013
1 parent 7d5636b commit e189d9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit e189d9d

Please sign in to comment.