]> Cypherpunks repositories - gostls13.git/commit
go/doc/comment: parse and print explicit links
authorRuss Cox <rsc@golang.org>
Sun, 3 Apr 2022 20:16:46 +0000 (16:16 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 11 Apr 2022 16:31:43 +0000 (16:31 +0000)
commit036b615c2c69c0e800d0cc4e1a18ac086b1e7ea6
treed5660bc65d829d7fac7414611d28d1d723972c20
parent910a33a0eed723696dc808d7801032cd3c035a6d
go/doc/comment: parse and print explicit 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 explicit links, like:

Visit the [Go home page].

[Go home page]: https://go.dev

For #51082.

Change-Id: If8104e45558314dae0346df614b03d5664421cf1
Reviewed-on: https://go-review.googlesource.com/c/go/+/397282
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/parse.go
src/go/doc/comment/print.go
src/go/doc/comment/testdata/link2.txt [new file with mode: 0644]
src/go/doc/comment/testdata/link3.txt [new file with mode: 0644]
src/go/doc/comment/testdata/link4.txt [new file with mode: 0644]
src/go/doc/comment/testdata/link5.txt [new file with mode: 0644]
src/go/doc/comment/testdata/link6.txt [new file with mode: 0644]
src/go/doc/comment/testdata/link7.txt [new file with mode: 0644]
src/go/doc/comment/text.go