-
-
Notifications
You must be signed in to change notification settings - Fork 394
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: JSX Node properties with dashes flagged as syntax errors #939
Labels
Comments
Most likely rules to be changed:
|
Gusted
added a commit
to Gusted/chroma
that referenced
this issue
Apr 1, 2024
- Allow comments to be inside of tags. - Fixes the lexing of `<!--` comments. - Allow tag names to include `-`. - Added tests. - Resolves alecthomas#940 - Resolves alecthomas#939
Gusted
added a commit
to Gusted/chroma
that referenced
this issue
Apr 2, 2024
- Allow comments to be inside of tags. - Fixes the lexing of `<!--` comments. - Allow tag names to include `-`. - Modify module rule to be more strict which is to match `declare module "Module name"`. - Added tests. - Resolves alecthomas#940 - Resolves alecthomas#939 - Resolves alecthomas#801
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Describe the bug
Custom JSX Node properties, like
data-test-id
are causing an error.The lexer doesn't like the dashes.
To Reproduce
https://swapoff.org/chroma/playground/#eyJsYW5ndWFnZSI6IlR5cGVTY3JpcHQiLCJzdHlsZSI6Im1vbm9rYWlsaWdodCIsInRleHQiOiJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuXG5leHBvcnQgZnVuY3Rpb24gT3V0cm8oKTogUmVhY3QuSlNYLkVsZW1lbnQge1xuICAgIHJldHVybiAoXG4gICAgICAgIDxwXG4gICAgICAgICAgICBkYXRhLXRlc3QtaWQ9XCJvdXRyb1wiXG4gICAgICAgID5UaGFua3MgZm9yIHJlYWRpbmchPC9wPlxuICAgICk7XG59IiwiY2xhc3NlcyI6ZmFsc2V9
The text was updated successfully, but these errors were encountered: