]> Cypherpunks repositories - gostls13.git/commit
go/doc/comment: parse and print headings
authorRuss Cox <rsc@golang.org>
Sun, 3 Apr 2022 20:30:08 +0000 (16:30 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 11 Apr 2022 16:31:46 +0000 (16:31 +0000)
commit6eceabf11936638c7000a7a12b4c285ffe9b58f9
tree84b1449e805e7327fbb5531a60c046c3c3ed2079
parente4e033a74cfcc75cb828cbd37e8279703e4620a3
go/doc/comment: parse and print headings

[This CL is part of a sequence implementing the proposal #51082.
The design doc is at https://go.dev/s/godocfmt-design.]

Implement both old-style and new-style headings, like:

Text here.

Old Style Heading

More text here.

# New Style Heading

More text here.

For #51082.

Change-Id: I0d735782d0d345794fc2d4e1bdaa0251b8d4bba2
Reviewed-on: https://go-review.googlesource.com/c/go/+/397284
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
api/next/51082.txt
src/go/doc/comment/html.go
src/go/doc/comment/markdown.go
src/go/doc/comment/parse.go
src/go/doc/comment/print.go
src/go/doc/comment/testdata/head.txt [new file with mode: 0644]
src/go/doc/comment/testdata/head2.txt [new file with mode: 0644]
src/go/doc/comment/testdata/head3.txt [new file with mode: 0644]
src/go/doc/comment/text.go