summaryrefslogtreecommitdiff
path: root/src/cmd/godoc/snippet.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/godoc/snippet.go')
-rwxr-xr-xsrc/cmd/godoc/snippet.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/godoc/snippet.go b/src/cmd/godoc/snippet.go
index 98bc97285..102878dc5 100755
--- a/src/cmd/godoc/snippet.go
+++ b/src/cmd/godoc/snippet.go
@@ -36,7 +36,7 @@ func (s *snippetStyler) LineTag(line int) (text []uint8, tag printer.HTMLTag) {
func (s *snippetStyler) Ident(id *ast.Ident) (text []byte, tag printer.HTMLTag) {
- text = strings.Bytes(id.Value)
+ text = strings.Bytes(id.Name())
if s.highlight == id {
tag = printer.HTMLTag{"<span class=highlight>", "</span>"}
}
@@ -115,7 +115,7 @@ func NewSnippet(decl ast.Decl, id *ast.Ident) (s *Snippet) {
if s == nil {
s = &Snippet{
id.Pos().Line,
- fmt.Sprintf(`could not generate a snippet for <span class="highlight">%s</span>`, id.Value),
+ fmt.Sprintf(`could not generate a snippet for <span class="highlight">%s</span>`, id.Name()),
}
}
return