From: Robert Griesemer Date: Thu, 28 Oct 2010 15:44:25 +0000 (-0700) Subject: godoc: bug fix (bug introduced with revision 3ee58453e961) X-Git-Tag: weekly.2010-11-02~46 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=12be168b4b68d504b1b2e654eedc7e6550d7c315;p=gostls13.git 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 --- diff --git a/src/pkg/go/doc/comment.go b/src/pkg/go/doc/comment.go index f54a672db5..9ff0bd536a 100644 --- a/src/pkg/go/doc/comment.go +++ b/src/pkg/go/doc/comment.go @@ -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")