Skip to content

Provide Spelling Suggestions for Named Capture Group References in Regular Expressions - #58613

Merged
Ron Buckton (rbuckton) merged 1 commit into
microsoft:mainfrom
graphemecluster:regex-group-name-suggestions
Jun 4, 2024
Merged

Provide Spelling Suggestions for Named Capture Group References in Regular Expressions#58613
Ron Buckton (rbuckton) merged 1 commit into
microsoft:mainfrom
graphemecluster:regex-group-name-suggestions

Conversation

@graphemecluster

@graphemeclustergraphemecluster (graphemecluster) commented May 22, 2024

Copy link
Copy Markdown
Contributor

#55600 already provides spelling suggestions for Unicode property value expressions (1a5228d), this PR extends it to capturing group names.

@typescript-botTypeScript Bot (typescript-bot) added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label May 22, 2024
@typescript-bot

Copy link
Copy Markdown
Contributor

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

@graphemecluster

Copy link
Copy Markdown
ContributorAuthor

IMO the current parameters in getSpellingSuggestion (and levenshteinWithMax) are too intolerant that even “Inhabited” doesn’t get corrected to “Inherited”.

@rbucktonRon Buckton (rbuckton) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but may not meet the bar for the 5.5 RC. We can merge this next week once main opens up for TypeScript 5.6.

@DanielRosenwasser

Copy link
Copy Markdown
Member

Any idea why I'm not able to see this in any nightly version of TypeScript?

Playground Link

image

@graphemecluster

Copy link
Copy Markdown
ContributorAuthor

Daniel Rosenwasser (@DanielRosenwasser) I can’t see /\p{letter}/u is getting a suggested correction to Letter either. Wonder if the same applies to all other related info message diagnostics.

@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@graphemecluster@typescript-bot@DanielRosenwasser@rbuckton