зеркало из https://github.com/golang/tools.git
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:
Родитель
e7016436a6
Коммит
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++
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче