Closed bartosz-k closed 5 months ago
The following piece of code is valid but it is parsed incorrectly:
const highlight = (text: string) => `\x1b[1m${text}\x1b[0m`; const dim = (text: string) => `\x1b[2m${text}\x1b[0m`; const error = (text: string) => `\x1b[91m${text}\x1b[0m`;
Here's a link to the TypeScript Playground showing that the snippet above is valid JavaScript or TypeScript: https://www.typescriptlang.org/play?#code/MYewdgzgLgBAFgSwOZwDbLrAvDAFFAUwA8oAuGaAJwTCQEoYsA+GAAwB0iBGAIwG0uAWwAkAb0IkAvp158ADINYBuAFChIsACYJBjPBLIUo1Wg2ZsZ-AEwjxxKNO78FyteGgwClSiEp789uRUNPSMLBxOfACcQmIGjrIuSkA
The symptom is broken highlighting in neovim:
The following piece of code is valid but it is parsed incorrectly:
Here's a link to the TypeScript Playground showing that the snippet above is valid JavaScript or TypeScript: https://www.typescriptlang.org/play?#code/MYewdgzgLgBAFgSwOZwDbLrAvDAFFAUwA8oAuGaAJwTCQEoYsA+GAAwB0iBGAIwG0uAWwAkAb0IkAvp158ADINYBuAFChIsACYJBjPBLIUo1Wg2ZsZ-AEwjxxKNO78FyteGgwClSiEp789uRUNPSMLBxOfACcQmIGjrIuSkA
The symptom is broken highlighting in neovim: