lib/re1.5: Distinguish between subject start-of-line and start-of-srch.
Otherwise a repeated sub/split will continue to match ^ to the start of that search. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
1692cad673
commit
adfd57c5fe
@ -130,6 +130,7 @@ Sub *update(Sub*, int, const char*);
|
||||
void decref(Sub*);
|
||||
|
||||
struct Subject {
|
||||
const char *begin_line;
|
||||
const char *begin;
|
||||
const char *end;
|
||||
};
|
||||
|
@ -68,7 +68,7 @@ recursiveloop(char *pc, const char *sp, Subject *input, const char **subp, int n
|
||||
subp[off] = old;
|
||||
return 0;
|
||||
case Bol:
|
||||
if(sp != input->begin)
|
||||
if(sp != input->begin_line)
|
||||
return 0;
|
||||
continue;
|
||||
case Eol:
|
||||
|
Loading…
Reference in New Issue
Block a user