Skip to content

No indent after for loop without braces, due to semicolons #253

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
michaelpg opened this issue Mar 6, 2015 · 1 comment
Closed

No indent after for loop without braces, due to semicolons #253

michaelpg opened this issue Mar 6, 2015 · 1 comment

Comments

@michaelpg
Copy link

Consider:

if (1)
        foo();
for (var i = 0; i < 10; i++) {
        foo();
}
for (var i = 0; i < 10; i++)
foo();

The last line should be indented, but it seems the semicolons in the brace-less for loop prevent the next line from being indented. I suspect the semicolons cause this problem because, for instance, for (;;) prevents the next line from being indented, but for(,,) does not.

@amadeus
Copy link
Collaborator

amadeus commented Apr 24, 2016

This should currently be fixed in develop

@amadeus amadeus closed this as completed Apr 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants