-
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
go/doc: lines with double-quotes cannot be headings #31739
Comments
This will render the annotations specs as code which acts as a visual divider. Unfortunately the heuristic for detecting sub-titles does not seem to work here (filed a go bug golang/go#31739). Change-Id: I6cd0d01170c3047c03f1a31b260fa0f98e53d296 GitOrigin-RevId: 94f9bf2
Actual example here: |
See https://godoc.org/go/doc#ToHTML for the rules of what makes a heading:
|
Specifically, that line isn't recognized as a heading because it contains the Here's the check in code: Lines 232 to 235 in 76659e4
|
Like I said, I also just tried 'Annotation' in the above example to exclude that it is due to the '"', but it was still not recognized as a heading. |
Is there a technical reason why we couldn't use quotes in titles? I hit this today, and was forced to reword the title, but that did not quite capture the original meaning. Would love to see quotes (double, and/or single) be included in the title allow-list! |
See #48305. |
What did you do?
Add a package doc like:
What did you expect to see?
The string
Annotation "annotation-name"
should be a title since it is delimited by blank lines, starts with and uppercase letter and does not end with punctuation.What did you see instead?
It shows up as a regular text paragraph. I've also tested simply putting the work Annotation there to exclude the quotes.
The text was updated successfully, but these errors were encountered: