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

Remove slash before line number hash in `URL.get()`

Open AnsonH opened this issue 1 year ago • 0 comments

This PR removes the unnecessary slash between the file path and the line number hash in URL.get(), for example:

- https://github.com/foo/bar//blob/3c9b61a149384f0969526c96f6cf4d99eb0e44db/README.md/#L10
+ https://github.com/foo/bar//blob/3c9b61a149384f0969526c96f6cf4d99eb0e44db/README.md#L10
                                                                 no more slash here ☝

This is because GitHub cannot render the code snippet preview of the permalink correctly if there's a slash before the line number hash, for example:

https://github.com/user-attachments/assets/334f96a6-6b65-41e9-918f-fa41cef52742

AnsonH avatar Feb 21 '25 05:02 AnsonH