-
-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimize common patterns, correct matching of .*
Previously, `.*` would match `.` and `..` in some cases where it shouldn't, unlike the Bash 5 behavior targeted. Also, this adds fast-path optimizations for: - `*` - `*.<some extension>` - `.*` which are by far the most common patterns in use, and ironically also some of the least-performant regular expressions generated by this library. While the regular expression generated by makeRE will always have to take the slower approach (lots of lookahead/lookbehind tests, conditional anchors, etc.), in the case of `minimatch()` or `Minimatch.test()`, or manually walking the MMRegExp objects in the set, it will be *much* faster.
- Loading branch information
Showing
4 changed files
with
233 additions
and
21 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
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