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

Create unicode regexps when necessary #1009

merged 6 commits into from Mar 29, 2018


None yet
1 participant

smashwilson commented Mar 29, 2018

atom/superstring#61 gave superstring buffers the ability to perform PCRE_UTF regular expression searches on demand, but at a steep performance penalty of about 4x.

To limit the impact of this, trigger PCRE_UTF searches only if:

  • The buffer contains astral-plane unicode characters (characters encoded in UTF16LE as a surrogate pair). Without this, . won't correctly consume a full surrogate pair.
  • The regular expression contains characters that participate in Unicode case folding and caseSensitive is false.

Fixes atom/superstring#56.

smashwilson added some commits Mar 29, 2018

@smashwilson smashwilson merged commit 1f48332 into master Mar 29, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@smashwilson smashwilson deleted the aw/april-is-the-cruelest-month branch Mar 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment