]> Cypherpunks repositories - gostls13.git/commit
go/doc/comment: parse and print code
authorRuss Cox <rsc@golang.org>
Sun, 3 Apr 2022 20:40:03 +0000 (16:40 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 11 Apr 2022 16:31:47 +0000 (16:31 +0000)
commit3f5d099663fab4a59133bbe7643f40deb5460509
tree3488866af3d0d60b33d630f0b61ac86202a0e300
parent6eceabf11936638c7000a7a12b4c285ffe9b58f9
go/doc/comment: parse and print code

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

Implement indented code blocks.

For #51082.

Change-Id: I0eacbf56e101424a875386cb6f26174b239561f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/397285
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/code.txt [new file with mode: 0644]
src/go/doc/comment/testdata/code2.txt [new file with mode: 0644]
src/go/doc/comment/testdata/code3.txt [new file with mode: 0644]
src/go/doc/comment/testdata/text9.txt [new file with mode: 0644]
src/go/doc/comment/text.go