]> Cypherpunks repositories - gostls13.git/commit
go/doc/comment: parse and print identifiers, automatic links
authorRuss Cox <rsc@golang.org>
Sun, 3 Apr 2022 12:59:56 +0000 (08:59 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 11 Apr 2022 16:31:41 +0000 (16:31 +0000)
commitae3d890202b2356fc0936f84349bdf08083884ac
treeb9633ec3223af13387eef0302bae168e4965c999
parent6130b88130ac6954f557e4737d88419d063b32c3
go/doc/comment: parse and print identifiers, automatic links

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

Implement parsing and printing of unmarked identifiers
and automatic URL links in plain text.

For #51082.

Change-Id: Ib83ad482937501a6fc14fa788eab289533a68e3a
Reviewed-on: https://go-review.googlesource.com/c/go/+/397280
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
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/hello.txt
src/go/doc/comment/testdata/link.txt [new file with mode: 0644]
src/go/doc/comment/testdata/para.txt [new file with mode: 0644]
src/go/doc/comment/testdata/text2.txt [new file with mode: 0644]
src/go/doc/comment/testdata/words.txt [new file with mode: 0644]
src/go/doc/comment/testdata_test.go
src/go/doc/comment/text.go