go/ast,go/format: newline missing between modified comment and function #66439
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go version go1.21.8 darwin/arm64
but same with 1.22 and Go dev branch on playground
What did you do?
Mutating node.Comments.List.Text produces incorrect formatting if adding newlines to /* */ style comments:
https://go.dev/play/p/IoJy719eLRt
As part of breaking too long lines, I stepped on the issue that if I cut a multi line comment that is before a function, once output back a new line between the comment and the function is missing eg
is produced
What did you see happen?
What did you expect to see?
The text was updated successfully, but these errors were encountered: