mirror of
https://github.com/golang/go
synced 2024-11-05 15:06:09 -07:00
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
This commit is contained in:
parent
e7016436a6
commit
976d735966
@ -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, "<a id=\"L%d\"></a><span class=\"ln\">%6d</span>\t", line, line)
|
||||
fmt.Fprintf(w, "<span id=\"L%d\" class=\"ln\">%6d</span>\t", line, line)
|
||||
line++
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user