Commit 8f6341d9 authored by Jonathan Rudenberg's avatar Jonathan Rudenberg Committed by Robert Griesemer

cmd/godoc: don't link unexported identifiers

R=golang-dev, gri, gri
CC=golang-dev
https://golang.org/cl/9722045
parent de316388
...@@ -56,7 +56,7 @@ func LinkifyText(w io.Writer, text []byte, n ast.Node) { ...@@ -56,7 +56,7 @@ func LinkifyText(w io.Writer, text []byte, n ast.Node) {
if info.mode == identVal { if info.mode == identVal {
fmt.Fprintf(w, `<span id="%s">`, info.name) fmt.Fprintf(w, `<span id="%s">`, info.name)
prev = "span" prev = "span"
} else { } else if ast.IsExported(info.name) {
fmt.Fprintf(w, `<a href="#%s">`, info.name) fmt.Fprintf(w, `<a href="#%s">`, info.name)
prev = "a" prev = "a"
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment