]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/godoc: don't link unexported identifiers
authorJonathan Rudenberg <jonathan@titanous.com>
Fri, 14 Jun 2013 19:37:23 +0000 (12:37 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 14 Jun 2013 19:37:23 +0000 (12:37 -0700)
R=golang-dev, gri, gri
CC=golang-dev
https://golang.org/cl/9722045

src/cmd/godoc/linkify.go

index 5b4862419eb5741185d418847dc142ed04a23889..7213abb4804299473688c0846da28adb5dfab2f0 100644 (file)
@@ -56,7 +56,7 @@ func LinkifyText(w io.Writer, text []byte, n ast.Node) {
                                if info.mode == identVal {
                                        fmt.Fprintf(w, `<span id="%s">`, info.name)
                                        prev = "span"
-                               } else {
+                               } else if ast.IsExported(info.name) {
                                        fmt.Fprintf(w, `<a href="#%s">`, info.name)
                                        prev = "a"
                                }