Typescript syntax highlighting breaking on certain regex following ! #806
Closed
Description
- VSCode Version: 1.43.0-insider (user setup)
- OS Version: Windows 10 pro
Steps to Reproduce:
- Fresh install of VSCode Insiders (Also occurring on stable)
- Paste the following code into a file:
class Foo {
public foo(): boolean {
return !/[():\w]/.test('foo');
}
private bar(): void {}
}
Does this issue occur when all extensions are disabled?: Yes
Funnily enough, it appears this code breaks GitHub's syntax highlighting as well.
Escaping the parens will fix syntax highlighting on the remainder of the document, but the syntax highlighting on the regular expression itself is still broken. Removing the !
and not escaping the parens fixes everything, but obviously that completely changes the meaning of the code.
And here's the prominent example in my code that sparked this issue:
The last screenshot is from stable with all my extensions, however I can confirm it appears similarly broken on a fresh insiders install with no extensions.
Metadata
Assignees
Labels
No labels