microsoft / TypeScript-TmLanguage

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

VSCode Syntax highlighting broken when using nullish coalescing operator in jsx #908

Open semos opened 2 years ago

semos commented 2 years ago

TS and JS Grammar Extension version: 0.0.55 / latest

Not a big deal, but in vscode, syntax highlighting breaks when using nullish coalescing operator in jsx. See how the closing tags after the null coalescing operators /> change of color (white, then reddish) :

image

When the correct highlighting should be :

image

Code example:

<InfoTooltip title={tooltip ?? ''}>
  <MenuItem>
    <ListItemIcon>
      <Icon fontSize="small" />
    </ListItemIcon>
    <ListItemText primary={label ?? <Component ref={clickRef} />} />
  </MenuItem>
</InfoTooltip>