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
Fix indentation/spacing in comments to render correctly in godoc #114559
Conversation
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
@liggitt what are you running to fix these back? |
Scanned the changes in the original PR and manually fixed wrong ones. Gofmt weirdly indented lines that continued and indented a space. I just deleted the blank line it inserted and made the continuation be at the same indent level |
thanks @liggitt ! i can confirm that you indeed did that :) /approve |
LGTM label has been added. Git tree hash: b55eddcbea01d9cb63c0ab64464e851110934117
|
/retest |
/triage accepted |
Looks like gofmt is attempting to "fix" indentation in comments by inserting TABs. That is a weird behavior. |
it is treating the subsequent indented lines as list items or code blocks, and indenting them with a separating line break to set them apart from the preceding text and make it clearer how the comments will actually be interpreted. See https://tip.golang.org/doc/go1.19#go-doc and https://tip.golang.org/doc/comment for details |
What type of PR is this?
/kind cleanup
/kind documentation
What this PR does / why we need it:
Fixes incorrect indentation/line breaks inserted by go1.19 gofmt
Fixes #111701
Does this PR introduce a user-facing change?