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

react lexer should be merged into javascript #844

Open
silverwind opened this issue Sep 9, 2023 · 1 comment
Open

react lexer should be merged into javascript #844

silverwind opened this issue Sep 9, 2023 · 1 comment

Comments

@silverwind
Copy link
Contributor

silverwind commented Sep 9, 2023

What problem does this feature solve?

JSX syntax is framework-agnostic and not specific to react (for example vue supports it too), so it should be handled as part of the regular javascript lexer, like already the case in the typescript lexer. Ideally even go a step further and share the JSX lexer for both javascript and typescript because semantics are the same in both.

JSX highlighting should work on .js files as well as in some (mostly legacy) cases, JSX could appear in such files as well.

@silverwind silverwind changed the title react lexer should be merged into javascript one react lexer should be merged into javascript Sep 9, 2023
@alecthomas
Copy link
Owner

Yeah agreed, JSX is so ubiquitous now that that makes complete sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants