microsoft / TypeScript-TmLanguage

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

Losing TypeScript syntax higlighting when using angle brackets on separate lines #890

Open gkn opened 2 years ago

gkn commented 2 years ago

Try this on https://vscode.dev/ or in VS Code:

See comments for where it fails.

class C {
    A() {
        return foo(bar, <
            a
        >{ v: "a string" }); // string is not colored    
    }

    B() {        
        return 101; // return keyword is not colored
    }
}

Does this issue occur when all extensions are disabled?: Yes/No

Steps to Reproduce:

1. 2.

orta commented 2 years ago

Looks like it's the start of that multi-line generic, this has the issue:

class C {
    A() {
        return foo(bar, <
a
        >{ v: "a string" }); // string is not colored    
    }

    B() {        
        return 101; // return keyword is not colored
    }
}

This does not:

class C {
    A() {
        return foo(bar, <a
        >{ v: "a string" }); // string is colored    
    }

    B() {        
        return 101; // return keyword is colored
    }
}