microsoft / TypeScript-TmLanguage

TextMate grammar files for TypeScript for VS Code, Sublime Text, and Atom.
MIT License
397 stars 125 forks source link

Incorrect syntax highlighting JSDoc comments `@default { }` #1023

Open babakfp opened 3 months ago

babakfp commented 3 months ago

Type: Bug

image

/** @default { open: "---", close: "---" } */

Highlighting works (kind of but not really) if I remove the whitespace like this:

image

/** @default {open:"---",close:"---"} */

Note that this ^^^ syntax highlighting is incorrect! Correct syntax highlighting looks like this:

image

Which is achieved by writing:

/**
 * @default
 * { open: "---", close: "---" }
 */

For simple reproduction use:

/** @default { } */

image

image


VS Code version: Code 1.87.2 (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:20:17.278Z) OS version: Windows_NT x64 10.0.22631 Modes: Unsupported