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

✨ Support unicode regexes #3939

Merged
merged 3 commits into from
May 30, 2023
Merged

✨ Support unicode regexes #3939

merged 3 commits into from
May 30, 2023

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented May 30, 2023

Regexes could be flagged as unicode ones by adding a small 'u' on them. When defined that way their behaviour defer a bit on some behaviours.

The most important change being that regexes start reading not byte by byte but code point by code point.

We just add support for them.

Category:

  • ✨ Introduce new features
  • 📝 Add or update documentation
  • ✅ Add or update tests
  • 🐛 Fix a bug
  • 🏷️ Add or update types
  • ⚡️ Improve performance
  • Other(s): ...

Potential impacts:

  • Generated values
  • Shrink values
  • Performance
  • Typings
  • Other(s): ...

Sorry, something went wrong.

dubzzz added 3 commits May 30, 2023 17:17
Regexes could be flagged as unicode ones by adding a small 'u' on them. When defined that way their behaviour defer a bit on some behaviours.

The most important change being that regexes start reading not byte by byte but code point by code point.

We just add support for them.
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c5c1886:

Sandbox Source
Vanilla Configuration

${/🐱+/u}
${/[🐱🐴]/u}
${/[🐱-🐴]/u}
${/[a-🐱b-🐴]/u}

Check warning

Code scanning / CodeQL

Overly permissive regular expression range

Suspicious character range that overlaps with a-🐱 in the same character class.
@dubzzz dubzzz merged commit eccf416 into main May 30, 2023
@dubzzz dubzzz deleted the unicode-regex branch May 30, 2023 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant