diff --git a/godoc/server.go b/godoc/server.go index 3ebff5c5..95b47754 100644 --- a/godoc/server.go +++ b/godoc/server.go @@ -644,7 +644,7 @@ func formatGoSource(buf *bytes.Buffer, text []byte, links []analysis.Link, patte // The first tab for the code snippet needs to start in column 9, so // it indents a full 8 spaces, hence the two nbsp's. Otherwise the tab // character only indents about two spaces. - fmt.Fprintf(saved, `  `, n, n) + fmt.Fprintf(saved, `%6d  `, n, n) n++ saved.Write(line) saved.WriteByte('\n') diff --git a/godoc/static/static.go b/godoc/static/static.go index dec963a0..14739d80 100644 --- a/godoc/static/static.go +++ b/godoc/static/static.go @@ -2915,11 +2915,7 @@ pre .ln { -ms-user-select: none; user-select: none; } -.ln::before { - /* Inserting the line numbers as a ::before pseudo-element avoids making - * them selectable; it's the trick Github uses as well. */ - content: attr(data-content); -} + body { color: #222; } diff --git a/godoc/static/style.css b/godoc/static/style.css index e4d1e4c3..79989eea 100644 --- a/godoc/static/style.css +++ b/godoc/static/style.css @@ -37,11 +37,7 @@ pre .ln { -ms-user-select: none; user-select: none; } -.ln::before { - /* Inserting the line numbers as a ::before pseudo-element avoids making - * them selectable; it's the trick Github uses as well. */ - content: attr(data-content); -} + body { color: #222; }