summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2013-03-19 11:14:35 -0700
committerRobert Griesemer <gri@golang.org>2013-03-19 11:14:35 -0700
commit5268119f26728ddd2ee9f8eebcbfcec83ac5bd69 (patch)
tree373b761d351a9dd90d6ca5072fbaa130f089f375 /lib
parenta88d82813dfa3f56a6df2ecd25eaba480ef7e58e (diff)
downloadgo-git-5268119f26728ddd2ee9f8eebcbfcec83ac5bd69.tar.gz
go/doc, godoc: improved note reading
- A note doesn't have to be in the first comment of a comment group anymore, and several notes may appear in the same comment group (e.g., it is fairly common to have a TODO(uid) note immediately following another comment). - Define a doc.Note type which also contains note uid and position info. - Better formatting in godoc output. The position information is not yet used, but could be used to locate the note in the source text if desired. Fixes #4843. R=r, cnicolaou CC=gobot, golang-dev https://golang.org/cl/7496048
Diffstat (limited to 'lib')
-rw-r--r--lib/godoc/package.html4
-rw-r--r--lib/godoc/package.txt2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/godoc/package.html b/lib/godoc/package.html
index 6795d142d1..33c2c27917 100644
--- a/lib/godoc/package.html
+++ b/lib/godoc/package.html
@@ -169,9 +169,11 @@
{{with $.Notes}}
{{range $marker, $content := .}}
<h2 id="pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</h2>
+ <ul>
{{range .}}
- {{comment_html .}}
+ <li>{{html .Body}}</li>
{{end}}
+ </ul>
{{end}}
{{end}}
{{end}}
diff --git a/lib/godoc/package.txt b/lib/godoc/package.txt
index 765bd769e1..bc11fc3c54 100644
--- a/lib/godoc/package.txt
+++ b/lib/godoc/package.txt
@@ -67,7 +67,7 @@ TYPES
{{range $marker, $content := .}}
{{$marker}}S
-{{range $content}}{{comment_text . " " "\t"}}
+{{range $content}}{{comment_text .Body " " "\t"}}
{{end}}{{end}}{{end}}{{end}}{{/*
---------------------------------------