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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider searching with JS regexes in unicode mode #61746

Closed
roblourens opened this issue Oct 24, 2018 · 4 comments 路 Fixed by microsoft/azuredatastudio#7206
Closed

Consider searching with JS regexes in unicode mode #61746

roblourens opened this issue Oct 24, 2018 · 4 comments 路 Fixed by microsoft/azuredatastudio#7206
Assignees
Labels
editor-find Editor find operations feature-request Request for new features or functionality search Search widget and operation issues verification-needed Verification of issue is requested verified Verification succeeded

Comments

@roblourens
Copy link
Member

JS regexes now support a u flag which changes their semantics regarding unicode characters in some ways and enables some new features.

Examples:

/饾寙{2}/u.test('饾寙饾寙') => true
/饾寙{2}/.test('饾寙饾寙') => false

/\p{Sm}/u.test('+') => true
/\p{Sm}/.test('+') => false

Example in vscode:

  • Have 饾寙饾寙 in editor
  • Search 饾寙{2}
  • No match
  • Searching 饾寙饾寙 does match

Not sure how many users are affected by this but it's worth investigating.

Also, this support seems half-baked in Node 8 but works more in Node 10, so maybe we wait for an electron update.

More info: https://mathiasbynens.be/notes/es6-unicode-regex

@roblourens roblourens added feature-request Request for new features or functionality search Search widget and operation issues editor-find Editor find operations labels Oct 24, 2018
@rebornix rebornix added this to the On Deck milestone Oct 24, 2018
@roblourens roblourens modified the milestones: On Deck, July 2019 Jul 2, 2019
@roblourens
Copy link
Member Author

@rebornix now that we are using Node 10, I suggest we do this for the editor. Any reason not to?

@rebornix
Copy link
Member

@roblourens I'm not aware of any reason why we don't want to do that. If I understand correctly, we only need to add u flag to the regex search, right?

@roblourens
Copy link
Member Author

Yes. I suggest we move it to August to give plenty of time. This goes with #62416 too.

@roblourens roblourens reopened this Jul 19, 2019
@roblourens roblourens modified the milestones: July 2019, August 2019 Jul 19, 2019
@roblourens
Copy link
Member Author

Broke some tests, couldn't get them fixed in time, pushing to september.

@isidorn isidorn added the verification-needed Verification of issue is requested label Oct 2, 2019
@joaomoreno joaomoreno added the verified Verification succeeded label Oct 3, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-find Editor find operations feature-request Request for new features or functionality search Search widget and operation issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants