diff options
author | Cosmos Nicolaou <cnicolaou@google.com> | 2013-02-25 20:34:09 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2013-02-25 20:34:09 -0800 |
commit | d6a057c90ed0746ae394efc0345b53f97d781b64 (patch) | |
tree | dbed448ee624552f3a96aba1b7ed04fe27da8775 /lib | |
parent | 26498684cb71de328b28974b87df3d5ab9486e4c (diff) | |
download | go-d6a057c90ed0746ae394efc0345b53f97d781b64.tar.gz go-d6a057c90ed0746ae394efc0345b53f97d781b64.zip |
cmd/godoc: add support for display Notes parsed by pkg/go/doc
pkg/go/doc: move BUG notes from Package.Bugs to the general Package.Notes field.
Removing .Bugs would break existing code so it's left in for now.
R=gri, gri, gary.burd, dsymonds, rsc, kevlar
CC=golang-dev
https://golang.org/cl/7341053
Diffstat (limited to 'lib')
-rw-r--r-- | lib/godoc/package.html | 19 | ||||
-rw-r--r-- | lib/godoc/package.txt | 8 |
2 files changed, 7 insertions, 20 deletions
diff --git a/lib/godoc/package.html b/lib/godoc/package.html index 85c737ec3a..1df1f9151d 100644 --- a/lib/godoc/package.html +++ b/lib/godoc/package.html @@ -70,12 +70,9 @@ <dd> <a href="#{{$tname_html}}.{{$name_html}}">{{node_html .Decl $.FSet}}</a></dd> {{end}} {{end}} - {{if .Bugs}} - <dd><a href="#pkg-bugs">Bugs</a></dd> - {{end}} - {{if .Notes}} - {{range $marker, $item := .Notes}} - <dd><a href="#pkg-{{$marker}}">{{$marker}}</a></dd> + {{if $.Notes}} + {{range $marker, $item := $.Notes}} + <dd><a href="#pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</a></dd> {{end}} {{end}} </dl> @@ -167,15 +164,9 @@ {{comment_html .Doc}} {{end}} - {{with .Bugs}} - <h2 id="pkg-bugs">Bugs</h2> - {{range .}} - {{comment_html .}} - {{end}} - {{end}} - {{with .Notes}} + {{with $.Notes}} {{range $marker, $content := .}} - <h2 id="pkg-{{$marker}}">{{$marker}}</h2> + <h2 id="pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</h2> {{range .}} {{comment_html .}} {{end}} diff --git a/lib/godoc/package.txt b/lib/godoc/package.txt index ab9506d65a..94239ca1a5 100644 --- a/lib/godoc/package.txt +++ b/lib/godoc/package.txt @@ -62,13 +62,9 @@ TYPES --------------------------------------- -*/}}{{with .Bugs}} -BUGS - -{{range .}}{{comment_text . " " "\t"}} -{{end}}{{end}}{{with .Notes}} +*/}}{{with $.Notes}} {{range $marker, $content := .}} -{{$marker}} +{{noteTitle $marker}}s {{range $content}}{{comment_text . " " "\t"}} {{end}}{{end}}{{end}}{{end}}{{/* |