diff options
| author | Jonathan Amsterdam <jba@google.com> | 2020-10-01 13:06:14 -0400 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2020-10-01 19:23:18 +0000 |
| commit | a8718fac7c742a3a1c61b8fddd6ef3ce1dd4d7c8 (patch) | |
| tree | 3be102c918abe6bd706dbb0a75a0fafe8ca0b24f /internal/testing/sample | |
| parent | d55659875f559e4051758b53fdae671c27e6e5c9 (diff) | |
| download | go-x-pkgsite-a8718fac7c742a3a1c61b8fddd6ef3ce1dd4d7c8.tar.xz | |
internal/godoc: restore AST after Encode
After encoding, put the AST back as it was (with a few irrelevant things missing).
That lets us Encode, then Render. The other way won't work. go/doc
removes things from the AST. It has a mode (doc.PreserveAST) that
doesn't change the AST, but has the effect of rendering function
bodies into the doc.
Change-Id: I02a2464bf514a876d9ab6bc0007deb7e246e999a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/258740
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Diffstat (limited to 'internal/testing/sample')
0 files changed, 0 insertions, 0 deletions
