Line-number links in diff views are broken
Created by: plibither8
- Sourcegraph version: sourcegraph.com
- Platform information: macOS Monterey, Google Chrome v102
Steps to reproduce:
- Open any diff view, like this
- Click one the line-numbers either in unified or split view
Expected behavior:
The link should be an anchor relative to the current diff page, and should scroll to line number.
Example: https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/commit/24da09b7547fb59011eea5a4135bc2219ffcd9b6?visible=3#diff-2f2646f22e6965ade83312dfb963ed12L102
Actual behavior:
The link with the anchor is absolute to the base URL.
Example: https://sourcegraph.test:3443/#diff-2f2646f22e6965ade83312dfb963ed12L102