]> Cypherpunks repositories - gostls13.git/commit
go/doc/comment: parse and print doc links
authorRuss Cox <rsc@golang.org>
Tue, 5 Apr 2022 18:12:41 +0000 (14:12 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 11 Apr 2022 16:31:42 +0000 (16:31 +0000)
commit910a33a0eed723696dc808d7801032cd3c035a6d
tree0fef0bccd00cd1ee72b9b956a4ffec880f0cf89c
parentae3d890202b2356fc0936f84349bdf08083884ac
go/doc/comment: parse and print doc 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 documentation links,
like [math.Sqrt] or [*golang.org/x/text/runes.Set].

For #51082.

Change-Id: I1cc73afbac1c6568773f921ce4b73e52f17acef6
Reviewed-on: https://go-review.googlesource.com/c/go/+/397281
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>
18 files changed:
api/next/51082.txt
src/go/doc/comment/html.go
src/go/doc/comment/markdown.go
src/go/doc/comment/mkstd.sh [new file with mode: 0755]
src/go/doc/comment/parse.go
src/go/doc/comment/print.go
src/go/doc/comment/std.go [new file with mode: 0644]
src/go/doc/comment/std_test.go [new file with mode: 0644]
src/go/doc/comment/testdata/README.md [new file with mode: 0644]
src/go/doc/comment/testdata/doclink.txt [new file with mode: 0644]
src/go/doc/comment/testdata/doclink2.txt [new file with mode: 0644]
src/go/doc/comment/testdata/doclink3.txt [new file with mode: 0644]
src/go/doc/comment/testdata/doclink4.txt [new file with mode: 0644]
src/go/doc/comment/testdata/doclink5.txt [new file with mode: 0644]
src/go/doc/comment/testdata/doclink6.txt [new file with mode: 0644]
src/go/doc/comment/testdata/doclink7.txt [new file with mode: 0644]
src/go/doc/comment/testdata_test.go
src/go/doc/comment/text.go