From 976d735966179a86086842e9cec0ad47d7eab5cc Mon Sep 17 00:00:00 2001 From: Folke Behrens Date: Thu, 1 Aug 2013 11:52:25 +1000 Subject: [PATCH] go.tools/godoc: Fix jump-to-line in source view. Remove the empty anchor element and add the line ID (Lnnn) to the span element that contains the line number. Fixes golang/go#5903. Fixes golang/go#5977. R=adg CC=bradfitz, golang-dev https://golang.org/cl/12189043 --- godoc/format.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/godoc/format.go b/godoc/format.go index d6eac704..6013238f 100644 --- a/godoc/format.go +++ b/godoc/format.go @@ -359,7 +359,7 @@ func FormatText(w io.Writer, text []byte, line int, goSource bool, pattern strin if line >= 0 { lineTag = func(w io.Writer, _ int, start bool) { if start { - fmt.Fprintf(w, "%6d\t", line, line) + fmt.Fprintf(w, "%6d\t", line, line) line++ } }