mirror of
https://github.com/golang/go
synced 2024-11-25 06:57:58 -07:00
cmd/godoc: add support for doc.Package.Notes
Add support for displaying the notes of the form 'MARKER(userid): comment' now collected by the go/doc package. Any two or more uppercase letters are recognised as a marker. R=gri, rsc, bradfitz CC=golang-dev https://golang.org/cl/7334044
This commit is contained in:
parent
d0f3475fda
commit
c5b4292eb3
@ -73,6 +73,11 @@
|
||||
{{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>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</dl>
|
||||
</div><!-- #manual-nav -->
|
||||
|
||||
@ -168,6 +173,14 @@
|
||||
{{comment_html .}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{with .Notes}}
|
||||
{{range $marker, $content := .}}
|
||||
<h2 id="pkg-{{$marker}}">{{$marker}}</h2>
|
||||
{{range .}}
|
||||
{{comment_html .}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{with .PAst}}
|
||||
|
@ -61,7 +61,12 @@ TYPES
|
||||
BUGS
|
||||
|
||||
{{range .}}{{comment_text . " " "\t"}}
|
||||
{{end}}{{end}}{{end}}{{/*
|
||||
{{end}}{{end}}{{with .Notes}}
|
||||
{{range $marker, $content := .}}
|
||||
{{$marker}}
|
||||
|
||||
{{range $content}}{{comment_text . " " "\t"}}
|
||||
{{end}}{{end}}{{end}}{{end}}{{/*
|
||||
|
||||
---------------------------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user