-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error offsets for character classes (#548)
* Error offset should be advanced by one character for "[\d-z]" invalid range error The code does a 1-char lookahead for a hyphen, but then doesn't advance the pointer to consume the hyphen when returning the error. Perl's error message (with "use warnings") does advance to just after the hyphen, so PCRE2 should match. Fixes #545. * Also improve error offsets for [[:bad:]], [[=...=]] and [z-\p{...}] cases
- Loading branch information
Showing
5 changed files
with
112 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7008,4 +7008,12 @@ a)"xI | |
|
||
/[[:digit:]\Q\E-H]+/ | ||
|
||
/[z-[:space:]]/ | ||
|
||
/[z-\d]/ | ||
|
||
/[[:space:]-z]/ | ||
|
||
/[\d-z]/ | ||
|
||
# End of testinput2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.