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

Ignore text in JSX tags #19

Open
stilt0n opened this issue Mar 3, 2024 · 0 comments
Open

Ignore text in JSX tags #19

stilt0n opened this issue Mar 3, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@stilt0n
Copy link
Owner

stilt0n commented Mar 3, 2024

People can type whatever they want between JSX tags, including valid / invalid ES imports. We need to be able to ignore these cases. E.g.:

return <p>the import keyword in jsx should be ignored</p>

Will panic because it does not expect a standalone slash.

Challenges:

// can't just count <div> and </div> tag instances to tell when JSX is over
// without being able to tell <div {...props}> matches </div>
<div onClick={ /* ... */} /><div>import</div></div>

// <foo ? x> is not a JSX tag and we shouldn't try to treat it as such:
5<foo ? x>8 : false;
@stilt0n stilt0n added the bug Something isn't working label Mar 3, 2024
@stilt0n stilt0n self-assigned this Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant