vscode-open-in-github icon indicating copy to clipboard operation
vscode-open-in-github copied to clipboard

Line number not being appended correctly

Open asinghvi-aurora opened this issue 1 year ago • 1 comments

I am trying to copy links to files with line numbers and there is a / being added to the URL before the line number, Example:

https://github.com/.../xyz.py/#L99

This doesn't work because the line number as #L99 needs to follow immediately after the file name.

These are my settings:

    "openInGitHub.github.protocol": "https", // Custom URL protocol
    "openInGitHub.github.domain": "github.com", // Custom GitHub domain
    "openInGitHub.remote.name": "origin", // Name of the remote repository
    "openInGitHub.remote.branch": "master", // Name of the remote branch
    "openInGitHub.useLocalDomain": false, // Use the local domain instead of the fixed github domain
    "openInGitHub.useLocalBranch": false, // Use the local branch instead of the fixed remote branch
    "openInGitHub.useLocalRange": true, // Highlight the local selection range, if there's one
    "openInGitHub.useLocalLine": true // Highlight the local line if there's no selection range

asinghvi-aurora avatar Apr 08 '25 19:04 asinghvi-aurora

I've opened a PR to fix it 😄 Hope the maintainer can merge it soon

https://github.com/fabiospampinato/vscode-open-in-github/pull/34

AnsonH avatar Apr 23 '25 06:04 AnsonH

Fixed in v2.4.0, thanks @AnsonH!

fabiospampinato avatar Oct 27 '25 23:10 fabiospampinato