Commit 12be168b authored by Robert Griesemer's avatar Robert Griesemer

godoc: bug fix (bug introduced with revision 3ee58453e961)

(thanks to Chris Dollin for identifying the cause)

Fixes #1237.

R=rsc
CC=golang-dev
https://golang.org/cl/2753043
parent e79ebb00
......@@ -78,10 +78,8 @@ func CommentText(comment *ast.CommentGroup) string {
lines = lines[0:n]
// Add final "" entry to get trailing newline from Join.
// The original loop always leaves room for one more.
if n > 0 && lines[n-1] != "" {
lines = lines[0 : n+1]
lines[n] = ""
lines = append(lines, "")
}
return strings.Join(lines, "\n")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment