Microsoft/TypeScript

Template string literal highlighting breaks on ternary operator with typeof

Open

#42.793 aperta il 13 feb 2021

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)TypeScript (6726 fork)batch import
BugDomain: Something ElseHelp Wanted

Metriche repository

Star
 (48.455 star)
Metriche merge PR
 (Merge medio 6g 17h) (9 PR mergiate in 30 g)

Descrizione

Bug Report

🔎 Search Terms

template string literal highlighting

🕗 Version & Regression Information

VSCode 1.53.2 + TypeScript 4.1.5

⏯ Playground Link

Workbench Repro

Workbench Repro

💻 Code

function HighlightingWorksFineHere(): void {}
`${0 ? typeof 0 ? 0 : 0 : 0}`;
function ButHereItIsBroken(): void {}
function HighlightingWorksFineHere(): void {}
`${0 ? typeof 0 : 0}`;
function ButHereItIsBroken(): void {}

🙁 Actual behavior

Highlighting breaks after template literal with ternary operator and typeof in VSCode (seems fine in playground though), looks like the closing backtick is not recognized or treated as opening backtick.

1 2

Guida contributor