-
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 all regex usage to separate module to add support for fancy-regex #270
Commits on Mar 15, 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 5901e1b - Browse repository at this point
Copy the full SHA 5901e1bView 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 d05bde4 - Browse repository at this point
Copy the full SHA d05bde4View 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 df56e71 - Browse repository at this point
Copy the full SHA df56e71View commit details -
Configuration menu - View commit details
-
Copy full SHA for f1af918 - Browse repository at this point
Copy the full SHA f1af918View commit details -
Configuration menu - View commit details
-
Copy full SHA for f37b17b - Browse repository at this point
Copy the full SHA f37b17bView 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 0b78764 - Browse repository at this point
Copy the full SHA 0b78764View 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 5caa56a - Browse repository at this point
Copy the full SHA 5caa56aView 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 bece70d - Browse repository at this point
Copy the full SHA bece70dView 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 d8eeff9 - Browse repository at this point
Copy the full SHA d8eeff9View 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 62d79e7 - Browse repository at this point
Copy the full SHA 62d79e7View 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 fa92de0 - Browse repository at this point
Copy the full SHA fa92de0View commit details -
Includes the fix for fancy-regex/fancy-regex#37 which caused a test failure with the Java syntax.
Configuration menu - View commit details
-
Copy full SHA for a7045b1 - Browse repository at this point
Copy the full SHA a7045b1View commit details
Commits on Mar 21, 2020
-
Only load regex module for features that need it
Might be worth introducing a specific feature for this and then have other features depend on it? Not sure.
Configuration menu - View commit details
-
Copy full SHA for 4f09143 - Browse repository at this point
Copy the full SHA 4f09143View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a74d87 - Browse repository at this point
Copy the full SHA 0a74d87View commit details
Commits on Mar 25, 2020
-
Make packs to fix html::tests::strings test for fancy
This applies the regex rewriting fixes on this branch to the default packs.
Configuration menu - View commit details
-
Copy full SHA for da2d4b5 - Browse repository at this point
Copy the full SHA da2d4b5View commit details
Commits on Mar 29, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 9cbe524 - Browse repository at this point
Copy the full SHA 9cbe524View commit details