Skip to content
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

search: fix symbol match URLs #7

Merged
merged 2 commits into from Feb 16, 2022
Merged

search: fix symbol match URLs #7

merged 2 commits into from Feb 16, 2022

Conversation

bobheadxi
Copy link
Owner

@bobheadxi bobheadxi commented Feb 16, 2022

As reported in #6 . Symbol match URL is a full path, e.g.

/github.com/sourcegraph/sourcegraph@rockskip-symbols/-/blob/enterprise/internal/rockskip/lib.go#L918:6-918:16

The getMatchURL copied from stream.ts gives us most of the same thing, and I was appending this URL to the match URL, creating an invalid URL. I could append this to src.instance instead, but for consistency with content matches which append ?${lineNumber}, I've added a preprocessor to turn url into just the anchor link and append it to the match URL.

Closes #6

Tested:

  • single result match, e.g. repo:github.com/sourcegraph/sourcegraph@rockskip-symbols type:symbol queryBlobs
  • multi result symbol match, e.g. context:@sourcegrapha/all monitoring type:symbol f:gcp

@bobheadxi bobheadxi merged commit 695282d into main Feb 16, 2022
@bobheadxi bobheadxi deleted the fix-symbols-match-url branch February 16, 2022 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

symbol match URL is incorrect
1 participant