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/internal/fetch/dochtml/internal/render: first paragraph should not be considered as a potential section heading #41616
Comments
Thanks for the feedback! If anyone is interested in working on this, we'd love to accept a contribution for this fix. |
@julieqiu I'd love to help, may I work on this one? |
@trongbq, please do! |
@hajimehoshi In the source code, the comment is written like this // DrawRectShaderOptions represents options for DrawRectShader
//
// This API is experimental. If you look at the first line, you can see that it doesn't have period mark at the end. // Regexp for headings.
headingHead = `^[\p{Lu}]` // any uppercase letter
headingBody = `([^,.;:!?+*/=()\[\]{}_^°&§~%#@<">\\]|'s )*` // any non-illegal character
headingTail = `([\p{L}\p{Nd}]|'s)?$` // any letter or digit Is is okay for you that I will send a PR to add period mark at the end for comments like this? It will make comment style in your code be consistent. @julieqiu I wonder should we keep existing check for header in comment. Do you think this is an issue need to be fixed in P/s: I looked in |
SGTM, thanks! /cc @dmitshur for input on this issue |
Thanks, that'd be helpful! |
@trongbq Thank you for investigating this. This godoc behavior is called a "section heading" and it is currently best documented in the second paragraph of
It is also mentioned in the The The |
@dmitshur thank you for such a clear explanation.
I see, let's me try to implement this behavior in |
Change https://golang.org/cl/258398 mentions this issue: |
What version of Go are you using (
go version
)?n/a
Does this issue reproduce with the latest release?
n/a
What operating system and processor architecture are you using (
go env
)?n/a
What did you do?
Open https://pkg.go.dev/github.com/hajimehoshi/ebiten@v1.12.0-rc.3#hdr-DrawRectShaderOptions_represents_options_for_DrawRectShader
What did you expect to see?
The text "DrawRectShaderOptions represents options for DrawRectShader" should be a normal text.
What did you see instead?
The text seems a header. Actually this is represented with a
<h3>
element.The text was updated successfully, but these errors were encountered: