This refactors jsx child printing logic and makes it more correct.
The only regression in this diff right now is that it preserves braces when you explicitly requested them but didn't need to.
That's not a terrible regression, but I don't understand why it's happening so I would want to fix that before landing.
Also need to add test cases before landing:
echo "
<head>
...{[title, ...other_elements]}
</head>" | esy x refmt
Output:
<head> ...{[title, ...other_elements]} </head>;
edit: Added test cases and better understood/fixed odd behavior.
This refactors jsx child printing logic and makes it more correct.
The only regression in this diff right now is that it preserves braces when you explicitly requested them but didn't need to. That's not a terrible regression, but I don't understand why it's happening so I would want to fix that before landing.
Also need to add test cases before landing:
Output:
edit: Added test cases and better understood/fixed odd behavior.