microsoft / microsoft/TypeScript-TmLanguage
Incorrect syntax highlighting for `@property` when the property contains a dash
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 471
- Forks
- 149
- PR merge metrics
- No merged PRs in 30d
Description
Does this issue occur when all extensions are disabled?: Yes
Version: 1.65.0-insider (Universal)
Commit: 1d618b2df1cf08f0e3ab706353f0a8f6f1424795
Date: 2022-02-18T05:15:42.132Z
Electron: 16.0.9
Chromium: 96.0.4664.174
Node.js: 16.9.1
V8: 9.6.180.23-electron.0
OS: Darwin x64 21.3.0
Steps to Reproduce:
- Type the following with javascript as language mode:
/**
* @typedef Foo
* @property {string} with-dash A description of the property
*/
Expected result
with-dash has one color
Actual result
with and -dash have two different colors

Note that TypeScript/Intellisense recognises the property name just fine:

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
Reproduce the JavaScript example from the issue in a TextMate grammar consumer and inspect the grammar rule handling JSDoc @property names. Adjust the relevant grammar so with-dash receives one scope and color, then verify that the reproduced snippet highlights the complete property name consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100