x/tools/godoc, go.dev: URL at end of sentence inside brackets causes trailing period to get incorrectly included in the URL #37640
Comments
Change https://golang.org/cl/221937 mentions this issue: |
Thanks for reporting. We should see if this can be fixed in godoc instead. The text in the documentation seems valid. It's a sentence that ends with a period, and a URL happens to be at the end of that sentence. The sentence is inside round brackets. I suspect the round brackets are making it not recognize the period at the end of a sentence. If we can fix this in godoc, that means a lot of Go documentation doesn't have to change to avoid this pitfall. I suspect there's more code in the wild that has a similar pattern. The issue is currently happening at https://pkg.go.dev/cmd/go/internal/lockedfile and https://golang.org/pkg/cmd/go/internal/lockedfile/ as well. |
Can you point out where you're referring to? |
@dmitshur I misspoke about this being done elsewhere, I had noticed other places where we didn't include the trailing period when referencing an issue in a comment (such as |
Thanks for clarifying. |
Change https://golang.org/cl/221940 mentions this issue: |
The link in the documentation for the Mutex.Lock() method includes a trailing period. This results in a 404 page when clicked. Inspecting the source, the attribute of interest is:
The fix for this should just be to remove the trailing period in the comment used to generate the documentation,
which is what is being done elsewhere.The text was updated successfully, but these errors were encountered: