mirror of
https://github.com/janet-lang/janet
synced 2025-11-18 00:05:13 +00:00
Don't include captures of last match from to combinator.
This commit is contained in:
@@ -289,7 +289,10 @@ tail:
|
|||||||
while (text <= s->text_end) {
|
while (text <= s->text_end) {
|
||||||
CapState cs2 = cap_save(s);
|
CapState cs2 = cap_save(s);
|
||||||
next_text = peg_rule(s, rule_a, text);
|
next_text = peg_rule(s, rule_a, text);
|
||||||
if (next_text) break;
|
if (next_text) {
|
||||||
|
if (rule[0] == RULE_TO) cap_load(s, cs2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
cap_load(s, cs2);
|
cap_load(s, cs2);
|
||||||
text++;
|
text++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user