Skip to content

Commit 2ad4f35

Browse files
authored
Merge pull request #49 from tegarabd/patch-1
[Fix] Enable non valid URI file path to not resulting 404 on github permalink
2 parents b606f22 + 437946c commit 2ad4f35

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function activate(context: vscode.ExtensionContext) {
8181

8282
repository.getCommit('HEAD').then((commit) => {
8383
const treeOrBlob = filePath.length === 0 ? 'tree' : 'blob';
84-
const url = `${httpsUrl}/${treeOrBlob}/${commit.hash}/${filePath}`;
84+
const url = `${httpsUrl}/${treeOrBlob}/${commit.hash}/${encodeURI(filePath)}`;
8585
vscode.env.clipboard.writeText(url);
8686
vscode.window.showInformationMessage(`"${url}" copied`, {
8787
modal: false,

0 commit comments

Comments
 (0)