Skip to content

Generics with React TSX Language Leave plain-text Token Open #2594

Open
@karlhorky

Description

Information:

  • Prism version: Test Drive version
  • Plugins: Test Drive plugins
  • Environment: Test Drive page

Description

The generic Foo<string> in the following code breaks syntax highlighting of the second function Add2 with the React TSX language:

function Add1(a, b) { return <div>a + b</div> }

type Bar = Foo<string>;

function Add2(a, b) { return <div>a + b</div> }

Example

Screenshots from Test Drive:

Screen Shot 2020-10-16 at 18 26 59

Screen Shot 2020-10-16 at 18 28 12

https://prismjs.com/test.html#language=tsx

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions