mirror of https://github.com/golang/go.git
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}}
|
{{if .Bugs}}
|
||||||
<dd><a href="#pkg-bugs">Bugs</a></dd>
|
<dd><a href="#pkg-bugs">Bugs</a></dd>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{if .Notes}}
|
||||||
|
{{range $marker, $item := .Notes}}
|
||||||
|
<dd><a href="#pkg-{{$marker}}">{{$marker}}</a></dd>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
</dl>
|
</dl>
|
||||||
</div><!-- #manual-nav -->
|
</div><!-- #manual-nav -->
|
||||||
|
|
||||||
|
|
@ -168,6 +173,14 @@
|
||||||
{{comment_html .}}
|
{{comment_html .}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{with .Notes}}
|
||||||
|
{{range $marker, $content := .}}
|
||||||
|
<h2 id="pkg-{{$marker}}">{{$marker}}</h2>
|
||||||
|
{{range .}}
|
||||||
|
{{comment_html .}}
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{with .PAst}}
|
{{with .PAst}}
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,12 @@ TYPES
|
||||||
BUGS
|
BUGS
|
||||||
|
|
||||||
{{range .}}{{comment_text . " " "\t"}}
|
{{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