Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/pkgsite: const block comment not rendered in some cases #38699

Closed
fishy opened this issue Apr 27, 2020 · 4 comments
Closed

x/pkgsite: const block comment not rendered in some cases #38699

fishy opened this issue Apr 27, 2020 · 4 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite/dochtml Issues related to package documentation in pkgsite pkgsite

Comments

@fishy
Copy link

fishy commented Apr 27, 2020

What is the URL of the page with the issue?

https://pkg.go.dev/github.com/reddit/baseplate.go@v0.0.0-20200427171913-839af98823fe/httpbp?tab=doc#pkg-constants, the first const block

What did you expect to see?

The code actually have comments on them, but they are not rendered in go.dev.

One thing to note is that they are not rendered on godoc.org either. I think it might has something to do with the long string const?

@gopherbot gopherbot added this to the Unreleased milestone Apr 27, 2020
@julieqiu
Copy link
Member

julieqiu commented May 1, 2020

/cc @dmitshur

@julieqiu julieqiu added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 1, 2020
@dmitshur
Copy link
Contributor

Thanks for reporting.

This is due to a limitation of the algorithm used to trim excessively large string literals and slices (see relevant code here). Documentation rendering on pkg.go.dev used the same algorithm as on godoc.org, so it was equally affected.

I've looked into it, and it is possible to resolve this issue. I'll send a fix.

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels May 22, 2020
@dmitshur dmitshur self-assigned this May 22, 2020
@julieqiu julieqiu changed the title go.dev: const block comment not rendered in some cases x/pkgsite: const block comment not rendered in some cases Jun 15, 2020
@gopherbot
Copy link

Change https://golang.org/cl/240217 mentions this issue: internal/fetch/dochtml/internal/render: preserve existing doc when trimming

@jba
Copy link
Contributor

jba commented Dec 16, 2020

This is fixed for this package, but see #42425 for ongoing (minor) formatting issues.

@jba jba closed this as completed Dec 16, 2020
@dmitshur dmitshur removed their assignment Dec 22, 2020
@golang golang locked and limited conversation to collaborators Dec 22, 2021
@hyangah hyangah added the pkgsite/dochtml Issues related to package documentation in pkgsite label May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite/dochtml Issues related to package documentation in pkgsite pkgsite
Projects
None yet
Development

No branches or pull requests

6 participants