Fix non-recognition of anchoring when preceded by (*MARK) etc.
This commit is contained in:
parent
9e4e6feee7
commit
0b64d9cfca
|
@ -85,6 +85,9 @@ via a string callout.
|
|||
|
||||
21. Improve MAP_JIT flag usage on MacOS. Patch by Rich Siegel.
|
||||
|
||||
22. If a pattern started with (*MARK), (*COMMIT), (*PRUNE), (*SKIP), or (*THEN)
|
||||
followed by ^ it was not recognized as anchored.
|
||||
|
||||
|
||||
Version 10.32 10-September-2018
|
||||
-------------------------------
|
||||
|
|
|
@ -4615,6 +4615,14 @@ for (;;)
|
|||
code += GET(code, 1) + 1 + LINK_SIZE;
|
||||
break;
|
||||
|
||||
case OP_MARK:
|
||||
case OP_COMMIT_ARG:
|
||||
case OP_PRUNE_ARG:
|
||||
case OP_SKIP_ARG:
|
||||
case OP_THEN_ARG:
|
||||
code += code[1] + PRIV(OP_lengths)[*code];
|
||||
break;
|
||||
|
||||
default:
|
||||
return code;
|
||||
}
|
||||
|
|
|
@ -5553,4 +5553,10 @@ a)"xI
|
|||
/foobar/g
|
||||
the foobar thing foobar again\=copy_matched_subject
|
||||
|
||||
/(*:XX)^abc/I
|
||||
|
||||
/(*COMMIT:XX)^abc/I
|
||||
|
||||
/(*ACCEPT:XX)^abc/I
|
||||
|
||||
# End of testinput2
|
||||
|
|
|
@ -16875,6 +16875,24 @@ Failed: error 128 at offset 14: assertion expected after (?( or (?(?C)
|
|||
0: foobar
|
||||
0: foobar
|
||||
|
||||
/(*:XX)^abc/I
|
||||
Capturing subpattern count = 0
|
||||
Compile options: <none>
|
||||
Overall options: anchored
|
||||
First code unit = 'a'
|
||||
Subject length lower bound = 3
|
||||
|
||||
/(*COMMIT:XX)^abc/I
|
||||
Capturing subpattern count = 0
|
||||
Compile options: <none>
|
||||
Overall options: anchored
|
||||
First code unit = 'a'
|
||||
Subject length lower bound = 3
|
||||
|
||||
/(*ACCEPT:XX)^abc/I
|
||||
Capturing subpattern count = 0
|
||||
Subject length lower bound = 0
|
||||
|
||||
# End of testinput2
|
||||
Error -70: PCRE2_ERROR_BADDATA (unknown error number)
|
||||
Error -62: bad serialized data
|
||||
|
|
Loading…
Reference in New Issue