-
Notifications
You must be signed in to change notification settings - Fork 18k
go/doc: apply usual quote changes to package synopses #27759
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
Comments
There's magical handling in the Lines 22 to 43 in 620bd5a
|
but not, at least in some docs. Bug? |
What @dotaheor is saying that these quotes aren't being replaced in synopses. |
Ah, that wasn't clear to me. It seems to me that the Personally, I'd rather see the special handling for the double back-ticks and double single-quote be removed. Go supports unicode, so the rare uses of them could just use the actual unicode characters for them. |
I'd be happy for us to stop [ab]using them in this way in standard library sources, but note that actually removing that support from |
CC @griesemer |
No, we're not going to remove this handling. Existing docs exist. |
Sorry, misunderstood - OK, then we should fix the synopses to do the same replacements. But let's not redefine the doc comment syntax and invalidate existing comments. |
I'm wary of this. The replacement logic is done by Now, if we consistently convert the double single-quotes to the unicode equivalent in all three cases, that seems more appropriate. |
I agree. I have a simpler solution if you may. We can handle this in the template render function inside godoc. With just an additional helper. Currently, it is this We can just port the minimal logic from So |
Probably we should factor out the |
@bcmills - Could you clarify your comment a bit ? I was looking to get going with this and wasn't fully sure what the consensus was. Did you mean to say we should convert the quotes for all the 3 functions ( I believe the primary concern here is that Or did you mean that we should convert to the unicode character directly, for all 3 cases ? That seems to be a clean solution to me. |
Yes: we should convert the quotes to Unicode characters ( |
Change https://golang.org/cl/150377 mentions this issue: |
A typo of "foo bar"? Or other special reasons?
https://www.google.com/search?q=site%3Agolang.org+"``"
Might be related to: #23389
The text was updated successfully, but these errors were encountered: