From 12be168b4b68d504b1b2e654eedc7e6550d7c315 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 28 Oct 2010 08:44:25 -0700 Subject: [PATCH] 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 --- src/pkg/go/doc/comment.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pkg/go/doc/comment.go b/src/pkg/go/doc/comment.go index f54a672db52..9ff0bd536ae 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")