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

Optimize newline handling for RegexOptions.Multiline #34566

Merged
merged 2 commits into from
Apr 9, 2020

Commits on Apr 9, 2020

  1. Optimize newline handling for RegexOptions.Multiline

    We previously didn't do any special handling of beginning-of-line anchors (^ when RegexOptions.Multiline is specified).  This PR adds special handling for the anchor so that FindFirstChar will jump to the next newline as part of its processing.
    
    As part of this, I also cleaned up some of the anchor handling code.  The RegexPrefixAnalyzer only ever returns a single anchor, but the rest of the code was written such that it was expecting multiple anchors.
    stephentoub committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    b106170 View commit details
    Browse the repository at this point in the history
  2. Addres PR feedback

    Also factor out a few lines of duplication.
    stephentoub committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    f8b1c02 View commit details
    Browse the repository at this point in the history