Skip to content

Commit

Permalink
fix: do not use previous value for slash token
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmlnc committed Dec 24, 2019
1 parent 606e35f commit c3c192d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,7 @@ const parse = (input, options) => {

state.output += prior.output + prev.output;
consume(value + advance());

push({ type: 'slash', value, output: '' });
push({ type: 'slash', value: '/', output: '' });
continue;
}

Expand All @@ -850,7 +849,7 @@ const parse = (input, options) => {
prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
state.output = prev.output;
consume(value + advance());
push({ type: 'slash', value, output: '' });
push({ type: 'slash', value: '/', output: '' });
continue;
}

Expand Down

0 comments on commit c3c192d

Please sign in to comment.