Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Incorrect syntax highlighting for `@property` when the property contains a dash

Open
#900 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Domain
devtools

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.

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:

  1. 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

image

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

Dominant language
TypeScript
Stars
471
Forks
149
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/TypeScript-TmLanguage

All issues in microsoft/TypeScript-TmLanguage

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.