Skip to content

Commit

Permalink
Merge 8c33cc0 into 7ddaa21
Browse files Browse the repository at this point in the history
  • Loading branch information
Risto-Stevcev committed Jul 1, 2016
2 parents 7ddaa21 + 8c33cc0 commit 416669d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parsimmon.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,8 @@
assertRegexp(re);
if (group) assertNumber(group);

var anchored = RegExp('^(?:'+re.source+')', (''+re).slice((''+re).lastIndexOf('/')+1));
var anchored = re.flags === 'g' ? RegExp('^('+re.source+')+')
: RegExp('^(?:'+re.source+')', (''+re).slice((''+re).lastIndexOf('/')+1));
var expected = '' + re;
if (group == null) group = 0;

Expand Down

0 comments on commit 416669d

Please sign in to comment.