x/tools/gopls: fails to link some scheme-less URLs #38285
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
We use the Relaxed regex from https://github.com/mvdan/xurls to find URLs to linkify. That regex accepts URLs without schemes like
golang.org
rather thanhttp://golang.org
, which we then parse withurl.Parse
. That works okay for most URLs. (Fromurl.Parse
: "Trying to parse a hostname and path without a scheme is invalid but may not necessarily return an error, due to parsing ambiguities.").However, for at least some URLs with colons, e.g.
127.0.0.1:80
, parsing fails ("first path segment in URL cannot contain colon") and the URL is not linkified.golang.org:8080
works for reasons I haven't dug into.The text was updated successfully, but these errors were encountered: