-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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,go/doc: examples can have trailing newlines inside the block #72098
Comments
I think the newlines are fine in the source code. It is annoying in pkgsite that there's a scrollbar whose sole purpose is to let us see that one extra blank line (at least, I suspect the causation works that way). So I would say, let's fix it there. @golang/pkgsite |
I believe the example extraction is in go/doc rather than pkgsite https://go.googlesource.com/go/+/4f45b2b7e079fc03d3444642e8a33ce6f959c6a6/src/go/doc/example.go#580 |
Thank you for your replies. Can I be an assignee in this issue? I'm a beginner and need time to explore source code to find a solution. |
Related Issues (Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
Change https://go.dev/cl/655115 mentions this issue: |
I found a problem in the example functions across the entire codebase while exploring the Go website. Many Go examples have an unnecessary newline between the end of their code blocks and the output comment. This results in extra newlines on the Go website and pkgsite.
For example, check the source code and the example on the website.
What is the best approach for this?
The text was updated successfully, but these errors were encountered: