Skip to content
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

[WIP] Kinda-working fancy-regex support #34

Closed
wants to merge 10 commits into from
Closed

Commits on May 1, 2018

  1. Kinda-working fancy_regex support.

    trishume authored and robinst committed May 1, 2018
    Configuration menu
    Copy the full SHA
    6f54e71 View commit details
    Browse the repository at this point in the history
  2. Switch to google/fancy-regex

    robinst committed May 1, 2018
    Configuration menu
    Copy the full SHA
    f69e842 View commit details
    Browse the repository at this point in the history
  3. Add a simple parsing test for YAML

    A related test for highlighting YAML currently fails with the
    fancy-regex changes, so this simpler test may make it easier to track
    down the problem.
    robinst committed May 1, 2018
    Configuration menu
    Copy the full SHA
    d37b735 View commit details
    Browse the repository at this point in the history
  4. 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.
    robinst committed May 1, 2018
    Configuration menu
    Copy the full SHA
    dc47f91 View commit details
    Browse the repository at this point in the history
  5. 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.
    robinst committed May 1, 2018
    Configuration menu
    Copy the full SHA
    180a08d View commit details
    Browse the repository at this point in the history
  6. 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.
    robinst committed May 1, 2018
    Configuration menu
    Copy the full SHA
    14cb2e0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3edab51 View commit details
    Browse the repository at this point in the history
  8. 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.
    robinst committed May 1, 2018
    Configuration menu
    Copy the full SHA
    84059f4 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2018

  1. Configuration menu
    Copy the full SHA
    ac0e315 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2018

  1. Replace println! and plain unwrap with nicer panic!

    I think the println! was only there to see the regex that failed to
    compile.
    robinst committed May 6, 2018
    Configuration menu
    Copy the full SHA
    1cbdf8b View commit details
    Browse the repository at this point in the history