Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript lexer fails to highlight string literal generics #1009

Open
1 task done
SKalt opened this issue Oct 14, 2024 · 0 comments · May be fixed by #1010
Open
1 task done

TypeScript lexer fails to highlight string literal generics #1009

SKalt opened this issue Oct 14, 2024 · 0 comments · May be fixed by #1010
Labels

Comments

@SKalt
Copy link

SKalt commented Oct 14, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

In TypeScript, string constants are valid types. Here's an screenshot from the syntax highlighting in VSCode:
Screenshot from 2024-10-14 07-54-45

Contrast with the syntax highlighting in the most recent version of chroma:

Screenshot from 2024-10-14 07-56-33

Note that the syntax error with the comma was resolved in #1002.

To Reproduce

type T<U> = Complicated<U, "stuff">
//                         ^-----^
//    not highlighted as a literal

playground link

@SKalt SKalt added the bug label Oct 14, 2024
@SKalt SKalt changed the title TypeScript lexer TypeScript lexer fails to highlight string literal generics Oct 14, 2024
SKalt added a commit to SKalt/chroma that referenced this issue Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant