diff --git a/doc/all.css b/doc/all.css index f70ef159974..b1d55cf25ad 100644 --- a/doc/all.css +++ b/doc/all.css @@ -157,6 +157,10 @@ h1#title { pre.ebnf, pre.grammar { background: #FFFFE0; } +span.ln { + font-size: 80%; + color: #777777; +} span.comment { color: #002090; } diff --git a/src/cmd/godoc/format.go b/src/cmd/godoc/format.go index d789ed55bfe..66b01aa6461 100644 --- a/src/cmd/godoc/format.go +++ b/src/cmd/godoc/format.go @@ -360,12 +360,12 @@ func FormatText(text []byte, line int, goSource bool, pattern string, selection if pattern != "" { highlights = regexpSelection(text, pattern) } - if comments != nil || highlights != nil || selection != nil { + if line >= 0 || comments != nil || highlights != nil || selection != nil { var lineTag LinkWriter if line >= 0 { lineTag = func(w io.Writer, _ int, start bool) { if start { - fmt.Fprintf(w, "%5d\t", line, line) + fmt.Fprintf(w, "%6d\t", line, line) line++ } }