-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Improve support for xml parts of jsx (React) => spaces, spread attributes and nested objects break the process #646
Comments
(oh, there is something to enable it in the configuration file :x ) => |
As you say works in many cases, but not all. Feel free to file specific bugs as you see them. |
For instance, this code works :
But if you add a space around the
And it breaks the syntax highlighter and the transpiler (babel). |
Please file this a s new issue. That looks like something easily solvable. |
Ok, I reopened the issue and changed the title and description a little bit. |
Cool, that works. |
Quick an clean fix ! Thanks a lot :) |
When working on a
.jsx
file, we have both javascript and xml in the same file. So when I try to beautify the js, it sometimes break all the xml. Would it be a way to ignore parts of the code ? Or to beautify xml as xml and js as js ?By the way, why are they not considered as e4x XML literals ? It works for most cases, but not always.
For instance, this code works :
But if you add a space around the
=
, like that :<p className = 'b'>
, it transforms it a very strange way :And it breaks the syntax highlighter and the transpiler (babel).
The spread attribute
{...this.something}
is not supported => http://facebook.github.io/react/docs/jsx-spread.html#spread-attributesIs transformed into :
The nested objects are not supported
It transformed into :
They both should keep their initial form
The text was updated successfully, but these errors were encountered: