Commit 7d0ea0a
internal/godoc/dochtml: enhance output parsing for example func
Current logic for detecting "concluding line comment" is not strict
enough that it may cause false-positive, causing some normal comment
(and code following it) to be discarded in the rendered web page.
Ensure that "concluding line comment" can only be prefixed by spaces.
Also add corresponding test case.
Fixes golang/go#65450
Change-Id: Ief9ec5326aa94965ca02d3278398cc5663ba395f
GitHub-Last-Rev: 7312ff3
GitHub-Pull-Request: #93
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/600415
kokoro-CI: kokoro <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>1 parent 47024e5 commit 7d0ea0a
File tree
2 files changed
+14
-1
lines changed- internal/godoc/dochtml/internal/render
2 files changed
+14
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
299 | 311 | | |
300 | 312 | | |
301 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
0 commit comments