Skip to content

Formatting Inserts Extra Space in JSX Element With Function Parameter #12456

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
mjbvz opened this issue Nov 23, 2016 · 2 comments
Closed

Formatting Inserts Extra Space in JSX Element With Function Parameter #12456

mjbvz opened this issue Nov 23, 2016 · 2 comments
Labels
Domain: Formatter The issue relates to the built-in formatter Fixed A PR has been merged for this issue Help Wanted You can do this Suggestion An idea for TypeScript VS Code Tracked There is a VS Code equivalent to this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Nov 23, 2016

From microsoft/vscode#15929

TypeScript: 2.0.10 and 2.2.0-dev.20161121

With a jsx file:

(<input ref={() => { return; }} />)

Expected
Running formatting on the document does nothing in this case.

Actual
An extra space is inserted between the two } characters:

(<input ref={() => { return; } } />)

This is inconsistent with how formatting works for other argument types. The issue seems similar to #9823

@mhegazy mhegazy added Suggestion An idea for TypeScript Domain: Formatter The issue relates to the built-in formatter VS Code Tracked There is a VS Code equivalent to this issue Help Wanted You can do this labels Dec 16, 2016
@mhegazy mhegazy added this to the Community milestone Dec 16, 2016
@saschanaz
Copy link
Contributor

Covered by #13092.

@mhegazy mhegazy modified the milestones: TypeScript 2.2, Community Dec 26, 2016
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Dec 26, 2016
@mhegazy mhegazy closed this as completed Dec 26, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Dec 26, 2016

thanks @saschanaz !

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Domain: Formatter The issue relates to the built-in formatter Fixed A PR has been merged for this issue Help Wanted You can do this Suggestion An idea for TypeScript VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

3 participants