-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
syntax: comments before case
are incorrectly indented
#917
Comments
Thanks, this looks like a valid bug. The printer should probably be a bit smarter. |
mvdan
changed the title
Comments before variable
syntax: comments before Sep 22, 2022
case
conditionals are incorrectly indentedcase
are incorrectly indented
Another very similar case below minimized from #950; I think they are all the same bug:
|
mvdan
added a commit
that referenced
this issue
Dec 3, 2022
We weren't doing that when a case clause item used quoted strings, due to the `p.tok == _LitWord` condition that shouldn't be there. Add tests, docs, and also prevent SingleLine from producing bad syntax when printing the new test. Fixes #917.
mvdan
added a commit
that referenced
this issue
Dec 4, 2022
We weren't doing that when a case clause item used quoted strings, due to the `p.tok == _LitWord` condition that shouldn't be there. Add tests, docs, and also prevent SingleLine from producing bad syntax when printing the new test. Fixes #917.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Notice
# baz
is indented 2 extra spaces, when it shouldn't be.Actual
Expected
The text was updated successfully, but these errors were encountered: