-
Notifications
You must be signed in to change notification settings - Fork 36
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
JSX Implicit fragment not being created in some JSX situations #1691
Comments
Also, I just noticed that this fails with a parse error: <node>
>if cond
<sibling> Seems likely to be related to this bug. |
This looks like expected behavior to me. JSX children are supposed to be strictly indented, and none of your examples are indented (the Are you proposing that |
Ohh, now I see - you wanted the second element to be a sibling. Right, we should probably create an implicit fragment in that case, though it's a bit ambiguous. Comparing a JSX node with Related, these also don't get an automatic fragment, but it's less clear whether they should: <div>
some text <div>
{value} Given the last in particular, I'm a little unclear whether |
Yeah, in my opinion, "code children" syntax should take precedence over comparing JSX nodes with |
In those examples ( It seems like Civet's "code children" feature (if not all of it's JSX support) assumes that JSX tags don't have side effects. |
Input:
Actual Output:
Expected Output:
Workaround: Wrap it in a fragment manually
This doesn't just happen in a top-level context, either. This will also trigger the same behavior:
The text was updated successfully, but these errors were encountered: