-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move regex use to module: Rebase #283
Move regex use to module: Rebase #283
Commits on Nov 25, 2019
-
Move all regex usage to separate module
That way we can add fancy-regex support behind a feature.
Configuration menu - View commit details
-
Copy full SHA for 2f6b1b9 - Browse repository at this point
Copy the full SHA 2f6b1b9View commit details
Commits on Nov 27, 2019
-
* Adds a std::error::Error impl for Error * Adds a backtracking limit to mitigate catastrophic backtracking
Configuration menu - View commit details
-
Copy full SHA for 731769e - Browse repository at this point
Copy the full SHA 731769eView commit details
Commits on Nov 28, 2019
-
Restore optimization of reusing Regions
Without this, some parsing benchmarks took 30% longer to run.
Configuration menu - View commit details
-
Copy full SHA for b2fa35a - Browse repository at this point
Copy the full SHA b2fa35aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d8de89f - Browse repository at this point
Copy the full SHA d8de89fView commit details
Commits on Nov 29, 2019
-
Configuration menu - View commit details
-
Copy full SHA for d668233 - Browse repository at this point
Copy the full SHA d668233View commit details -
Compile regexes in multi-line mode for the "newlines" syntaxes
Some of the regexes include `$` and expect it to match end of line. In fancy-regex, `$` means end of text by default. Adding `(?m)` activates multi-line mode which changes `$` to match end of line. This fixes a large number of the failed assertions with syntest.
Configuration menu - View commit details
-
Copy full SHA for 49c0dd4 - Browse repository at this point
Copy the full SHA 49c0dd4View commit details -
Replace POSIX character classes so that they match Unicode as well
In fancy-regex, POSIX character classes only match ASCII characters. Sublime's syntaxes expect them to match Unicode characters as well, so transform them to corresponding Unicode character classes.
Configuration menu - View commit details
-
Copy full SHA for 67c971d - Browse repository at this point
Copy the full SHA 67c971dView commit details -
Replace ^ with \A in multi-line mode regexes
With the regex crate and fancy-regex, `^` in multi-line mode also matches at the end of a string like "test\n". There are some regexes in the syntax definitions like `^\s*$`, which are intended to match a blank line only. So change `^` to `\A` which only matches at the beginning of text.
Configuration menu - View commit details
-
Copy full SHA for 085c9d3 - Browse repository at this point
Copy the full SHA 085c9d3View commit details -
Fix code that skips a character to work with unicode
Note that this wasn't a problem with Oniguruma because it works on UTF-8 bytes, but fancy-regex works on characters.
Configuration menu - View commit details
-
Copy full SHA for 6214e6f - Browse repository at this point
Copy the full SHA 6214e6fView commit details -
Fix rewriting of "newlines" mode regexes
Always adding `(?m)` for the entire regex meant that `.` also changed meaning, which is not what we want. The safer option is to use `(?m:$)` for `$` only. That also means we don't have to bother with `\A`. But we do need to parse look-behinds because we can't use `(?m:$)` in it.
Configuration menu - View commit details
-
Copy full SHA for 6842e7b - Browse repository at this point
Copy the full SHA 6842e7bView commit details -
Remove special treatment of look-behind
Turns out `(?m:$)` works in look-behinds, just not `(?m)$(?-m)` which I was using before.
Configuration menu - View commit details
-
Copy full SHA for fe28a3c - Browse repository at this point
Copy the full SHA fe28a3cView commit details
Commits on Mar 19, 2020
-
Move all regex usage to separate module
That way we can add fancy-regex support behind a feature.
Configuration menu - View commit details
-
Copy full SHA for 174045d - Browse repository at this point
Copy the full SHA 174045dView commit details -
* Adds a std::error::Error impl for Error * Adds a backtracking limit to mitigate catastrophic backtracking
Configuration menu - View commit details
-
Copy full SHA for c2b97cc - Browse repository at this point
Copy the full SHA c2b97ccView commit details -
Restore optimization of reusing Regions
Without this, some parsing benchmarks took 30% longer to run.
Configuration menu - View commit details
-
Copy full SHA for 00885f9 - Browse repository at this point
Copy the full SHA 00885f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for a102c13 - Browse repository at this point
Copy the full SHA a102c13View commit details -
Configuration menu - View commit details
-
Copy full SHA for 37e9849 - Browse repository at this point
Copy the full SHA 37e9849View commit details -
Compile regexes in multi-line mode for the "newlines" syntaxes
Some of the regexes include `$` and expect it to match end of line. In fancy-regex, `$` means end of text by default. Adding `(?m)` activates multi-line mode which changes `$` to match end of line. This fixes a large number of the failed assertions with syntest.
Configuration menu - View commit details
-
Copy full SHA for f18e015 - Browse repository at this point
Copy the full SHA f18e015View commit details -
Replace POSIX character classes so that they match Unicode as well
In fancy-regex, POSIX character classes only match ASCII characters. Sublime's syntaxes expect them to match Unicode characters as well, so transform them to corresponding Unicode character classes.
Configuration menu - View commit details
-
Copy full SHA for 5a94c5e - Browse repository at this point
Copy the full SHA 5a94c5eView commit details -
Replace ^ with \A in multi-line mode regexes
With the regex crate and fancy-regex, `^` in multi-line mode also matches at the end of a string like "test\n". There are some regexes in the syntax definitions like `^\s*$`, which are intended to match a blank line only. So change `^` to `\A` which only matches at the beginning of text.
Configuration menu - View commit details
-
Copy full SHA for 5414dce - Browse repository at this point
Copy the full SHA 5414dceView commit details -
Fix code that skips a character to work with unicode
Note that this wasn't a problem with Oniguruma because it works on UTF-8 bytes, but fancy-regex works on characters.
Configuration menu - View commit details
-
Copy full SHA for b71c725 - Browse repository at this point
Copy the full SHA b71c725View commit details -
Fix rewriting of "newlines" mode regexes
Always adding `(?m)` for the entire regex meant that `.` also changed meaning, which is not what we want. The safer option is to use `(?m:$)` for `$` only. That also means we don't have to bother with `\A`. But we do need to parse look-behinds because we can't use `(?m:$)` in it.
Configuration menu - View commit details
-
Copy full SHA for 5997d36 - Browse repository at this point
Copy the full SHA 5997d36View commit details -
Remove special treatment of look-behind
Turns out `(?m:$)` works in look-behinds, just not `(?m)$(?-m)` which I was using before.
Configuration menu - View commit details
-
Copy full SHA for e4bf16c - Browse repository at this point
Copy the full SHA e4bf16cView commit details -
Giles Cope committed
Mar 19, 2020 Configuration menu - View commit details
-
Copy full SHA for 33f9a19 - Browse repository at this point
Copy the full SHA 33f9a19View commit details -
Configuration menu - View commit details
-
Copy full SHA for 76bd731 - Browse repository at this point
Copy the full SHA 76bd731View commit details -
Pick fancy-regex if no default features
Giles Cope committedMar 19, 2020 Configuration menu - View commit details
-
Copy full SHA for 1b68bf3 - Browse repository at this point
Copy the full SHA 1b68bf3View commit details -
Giles Cope committed
Mar 19, 2020 Configuration menu - View commit details
-
Copy full SHA for 807b60d - Browse repository at this point
Copy the full SHA 807b60dView commit details
Commits on Mar 20, 2020
-
Should be able to work with no regex lib.
A `null` implmentation for when --no-default-features.
Giles Cope committedMar 20, 2020 Configuration menu - View commit details
-
Copy full SHA for 447f4b8 - Browse repository at this point
Copy the full SHA 447f4b8View commit details -
Regex tests should run if no regex feature selected.
Giles Cope committedMar 20, 2020 Configuration menu - View commit details
-
Copy full SHA for d173896 - Browse repository at this point
Copy the full SHA d173896View commit details