; letk2 = Hello ; // Empty tags <>>;// no whitespace < > >;// lots of whitespace </*starting wrap*/>/*ending wrap*/>;// comments in the tags <>hi>;// text inside <>hi
bye
>;// children <>1<>2.12.2>3>;// nested fragments <>#>;// # would cause scanning error if not in jsxtext // Tags after substitutions in templates
`aaa${//comment /*comment*/}` // Don't highlight tags within variable declaration let myIdentity:<T>(arg:T) =>T =identity; var myIdentity:<U>(arg:U) =>U =identity; const myIdentity: {<T>(arg:T):T} =identity; // Don't highlight tags within interfaces and classes interfaceGenericIdentityFn { <T>(arg:T):T; <noTag /> } classHandler { info:<T>(arg:T):T <noTag />; } // Check character after tag name, do not highlight invalid tags <noTag ? <noTag , <noTag /* comment */? <noTag# <noTag/*comment*/# // Tagged template literals tagFunc`
Hello world! ${/>;22+"11"}`; obj..tagFunc`Setting ${setting} is ${value}!`;