microsoft / microsoft/TypeScript-TmLanguage
\- in regular expression not treated as escape
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 471
- Forks
- 149
- PR merge metrics
- No merged PRs in 30d
Description
TS and JS Grammar Extension version: latest
Code
const x = /[a\-b]/g
Bug
\-b is treated as a single character class. However the \- should treated as an escape
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source file or test; start by reproducing the TypeScript example in the TS and JS Grammar Extension and locating the grammar rule that classifies character classes. Done means the escaped hyphen follows the expected behavior, with a regression check if the repository's existing tests cover this grammar.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100