-
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: link detection in ToHTML is misbehaving #22285
Comments
I would not expect to see that. It's a <pre> block containing the following text:
It's just text. It happens to be in present format. But godoc can't know that it should parse the square brackets and text inside as a link. The best it could do is link all of Also see https://golang.org/pkg/go/doc/#ToHTML:
I think this is working as intended (except perhaps the URL matching stopping at the accented letter). |
CC @dsnet who has been looking at godoc links. But I tend to agree that this is working as intended. |
The logic for URL detection is in A reasonable adjustment to the URL heuristic is to forbid the URL from containing an closing parenthesis as the first parenthesis of that form. Thus, |
Change https://golang.org/cl/94876 mentions this issue: |
An update on what I said earlier. Following the same logic, I'm not sure if |
Please answer these questions before submitting your issue. Thanks!
What did you do?
Run the following commands on my machine (running macOS):
navigated to http://localhost:6060/pkg/golang.org/x/tools/present and did a search for
renee
.What did you expect to see?
Valid link to
https://www.instagram.com/reneefrench
namedRenée French
.What did you see instead?
Invalid link pointing to
https://www.instagram.com/reneefrench/][Ren
.Does this issue reproduce with the latest release (go1.9.1)?
Yes, even on https://godoc.org/golang.org/x/tools/present.
System details
The text was updated successfully, but these errors were encountered: