You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gopls/internal/golang: use correct imports in HTML pkg doc links
This CL fixes two bugs in the rendering of Doc Links in doc
comments in the web-based "Browse package documentation" feature:
1. Doc links were resolved based on an arbitrary file in
the package, even though different files have different import
mappings. Now, the correct file's mapping is used
2. In the presence of a renaming import, doc links often use the
original package name, not the local package name.
Now, the local name is preferred, but if none is found the
original name is used.
+ tests of both fixes.
(This CL was an attempt to get some value out of a fruitless
attempt to fixgolang/go#61677 that turned out to be more complex
than expected. The not-yet-common logic has moved out of
PackageDocHTML into comments.go.)
Updates golang/go#61677
Change-Id: Iebd1b11786759fbfad40c8c3b0107c80fb90ebf7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/623637
LUCI-TryBot-Result: Go LUCI <[email protected]>
Commit-Queue: Alan Donovan <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
Auto-Submit: Alan Donovan <[email protected]>
0 commit comments