-
Notifications
You must be signed in to change notification settings - Fork 132
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
Clarify JSX/React WhiteSpace rules #40
Comments
facebook/react#480 (comment), there is also the full technical reasoning facebook/react#480, but it may be a bit hard to digest. The idea being that indentation is not intended for output and trailing whitespace is a bad idea all-around. 2 is added because that is almost universally what you want and not having it is really really cumbersome and mistake-prone. |
This question is being raised rather often, I'm thinking maybe we should add some kind of |
I would prefer Consider: <div>
test
</div> Would be weird if something things see it as |
@basarat "other's see it as |
Other implementations that might use JSX for an HTML emit |
Based on the following test cases:
For
JSXText
(https://facebook.github.io/jsx/) I've drawn the following set of rules:parent
or asibling
):tabs
(alt09
) is replaced with a singlespace
demoAm I missing something ... and is this already documented elsewhere (specifically
2
wasn't mentioned explicitly anywhere I could find). Need this information to help with TypeScript/TSX integration 🌹I know this is specific to React Emit for JSX but this seemed like the more appropriate repo 😃
PS : I've seen http://facebook.github.io/react/blog/2014/02/20/react-v0.9.html#jsx-whitespace
The text was updated successfully, but these errors were encountered: