Skip to content

Commit

Permalink
fix: Make follow link to work with vscode 1.53/1.54
Browse files Browse the repository at this point in the history
  • Loading branch information
svsool committed Mar 20, 2021
1 parent cd085f9 commit b60258e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/features/DocumentLinkProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ export default class DocumentLinkProvider implements vscode.DocumentLinkProvider

const link = new vscode.DocumentLink(
new vscode.Range(linkStart, linkEnd),
vscode.Uri.parse(
`command:_memo.openDocumentByReference?${encodeURIComponent(
JSON.stringify({ reference }),
)}`,
),
vscode.Uri.parse('command:_memo.openDocumentByReference').with({
query: JSON.stringify({ reference: encodeURIComponent(reference) }),
}),
);

link.tooltip = 'Follow link';
Expand Down

0 comments on commit b60258e

Please sign in to comment.