-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
literal: fix anchor performance problem
The Match literal iterator would repeatedly look for matches in the remainder of the input after it found its first match regardless of whether or not the regex was anchored at the start. This commit adds logic to make sure that we don't keep looking for matches after the first match is returned for a start-anchored literal regex.
- Loading branch information
1 parent
2f6f88e
commit cf8acc7
Showing
1 changed file
with
66 additions
and
2 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