Skip to content

formatOnType removes spaces between if and opening parentheses #1791

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
brettcannon opened this issue May 29, 2018 · 2 comments
Closed

formatOnType removes spaces between if and opening parentheses #1791

brettcannon opened this issue May 29, 2018 · 2 comments
Labels
area-formatting bug Issue identified by VS Code Team member as probable bug

Comments

@brettcannon
Copy link
Member

if (this_is_one_thing and that_is_another_thing):
   pass

becomes:

if(this_is_one_thing and that_is_another_thing):
   pass

This breaks syntax.

@brettcannon brettcannon added bug Issue identified by VS Code Team member as probable bug needs PR area-formatting labels May 29, 2018
@brettcannon
Copy link
Member Author

This typically comes up when the statement spans lines, e.g.

if (this and
    that):
  pass

@MikhailArkhipov
Copy link

Same as #1780

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-formatting bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants