From c5b4292eb3dd41766a9ea0e89f630c5ec783bf42 Mon Sep 17 00:00:00 2001 From: Cosmos Nicolaou Date: Thu, 14 Feb 2013 20:35:08 -0800 Subject: [PATCH] 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 --- lib/godoc/package.html | 13 +++++++++++++ lib/godoc/package.txt | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/godoc/package.html b/lib/godoc/package.html index e67cf93bed..cff91fa226 100644 --- a/lib/godoc/package.html +++ b/lib/godoc/package.html @@ -73,6 +73,11 @@ {{if .Bugs}}
Bugs
{{end}} + {{if .Notes}} + {{range $marker, $item := .Notes}} +
{{$marker}}
+ {{end}} + {{end}} @@ -168,6 +173,14 @@ {{comment_html .}} {{end}} {{end}} + {{with .Notes}} + {{range $marker, $content := .}} +

{{$marker}}

+ {{range .}} + {{comment_html .}} + {{end}} + {{end}} + {{end}} {{end}} {{with .PAst}} diff --git a/lib/godoc/package.txt b/lib/godoc/package.txt index 8b9ec456bf..12964b0010 100644 --- a/lib/godoc/package.txt +++ b/lib/godoc/package.txt @@ -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}}{{/* --------------------------------------- -- 2.48.1