Skip to content

Unwanted space after the colon of a namespaced JSX attribute #55293

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

Closed
lyonbot opened this issue Aug 7, 2023 · 0 comments · Fixed by #55294
Closed

Unwanted space after the colon of a namespaced JSX attribute #55293

lyonbot opened this issue Aug 7, 2023 · 0 comments · Fixed by #55294
Labels
Bug A bug in TypeScript Help Wanted You can do this
Milestone

Comments

@lyonbot
Copy link
Contributor

lyonbot commented Aug 7, 2023

🔎 Search Terms

formatting jsx namespaced attribute extra space

🕗 Version & Regression Information

  • This changed between versions v5.0.x and v5.1.0

⏯ Playground Link

https://www.typescriptlang.org/zh/play?#code/MYewdgzgLgBAhjAvDAPAEwJYDcBc8EBmIIMeMARnAE6IBEUAptLTESDpQF50CsLA9AD4A3EA

💻 Code

Paste this into a editor (like VSCode), then format it with default foramtter:

const a = <div: aa foo : bar="test" foo:baz="5" />;

🙁 Actual behavior

Outputs

const a = <div: aa foo: bar="test" foo: baz="5" />;

🙂 Expected behavior

Outputs

const a = <div:aa foo:bar="test" foo:baz="5" />;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants