Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/printer: set prefix correctly when all comment lines blank
Fixes (second half of?) golang issue 5128. In stripCommonPrefix, the prefix was correctly calculated in all cases except when there are more than 2 lines but all lines except the first and last are blank. This fix detects that case and correctly sets the prefix calculated from the last line. That fixes the issue where gofmt was continuously adding indentation in such cases on every format operation.
- Loading branch information