Skip to content

Provide User-Friendly Message for Extended Unicode Escapes in Regular Expressions in Non-Unicode Modes #58981

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

Merged
merged 5 commits into from
Jul 18, 2024

Conversation

graphemecluster
Copy link
Contributor

This replaces the error message of /\u{10000}/ from Hexadecimal digit expected. to Unicode escape sequences are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. (message analogous to TS1530), as @k1tikurisu pointed out in his article [in Japanese] that it’s hard to understand the intention of the message.

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jun 23, 2024
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@graphemecluster graphemecluster force-pushed the regex-extended-escape branch from bffa7ce to 115f5eb Compare July 17, 2024 20:50
graphemecluster and others added 2 commits July 18, 2024 04:54
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
@graphemecluster
Copy link
Contributor Author

graphemecluster commented Jul 17, 2024

I’ve reordered the commits and let the checks perform both before and after your suggested change to ensure everything works as expected.
(But I don‘t understand why there’s an unrelated assertion error before the rerun.)

@rbuckton rbuckton merged commit 165350d into microsoft:main Jul 18, 2024
29 checks passed
@sandersn sandersn removed this from PR Backlog Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants