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

Comments

@fishy
Copy link

@fishy 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
Contributor

@julieqiu julieqiu commented May 1, 2020

/cc @dmitshur

@dmitshur
Copy link
Contributor

@dmitshur dmitshur commented May 22, 2020

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 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

@gopherbot gopherbot commented Jun 27, 2020

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

@jba
Copy link
Contributor

@jba jba commented Dec 16, 2020

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

@jba jba closed this Dec 16, 2020
@dmitshur dmitshur removed their assignment Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants