]> Cypherpunks repositories - gostls13.git/commit
go/doc: Detect headings in comments and format them as h3 in html.
authorVolker Dobler <dr.volker.dobler@gmail.com>
Thu, 1 Dec 2011 17:49:58 +0000 (09:49 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 1 Dec 2011 17:49:58 +0000 (09:49 -0800)
commita6729b3085d764b845de505606008311860512b7
treef5fc5c8d933cd9c86659e171cf5d8e394400f77d
parentd5f37122d2235630aad5a67ec45f7d6976c4f2ed
go/doc: Detect headings in comments and format them as h3 in html.

To structure larger sections of comments in html output headings
are detected in comments and formated as h3 in the generated html.
A simple heuristic is used to detect headings in comments:
A heading is a non-blank, non-indented line preceded by a blank
line. It is followed by a blank and a non-blank, non-indented line.
A heading must start with an uppercase letter and end with a letter,
digit or a colon.  A heading may not contain punctuation characters.

R=jan.mercl, gri, adg, rsc, r
CC=golang-dev
https://golang.org/cl/5437056
doc/all.css
src/pkg/go/doc/Makefile
src/pkg/go/doc/comment.go
src/pkg/go/doc/comment_test.go [new file with mode: 0644]
src/pkg/go/doc/headscan.go [new file with mode: 0644]