mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
Use the document that contains the md link as the resource for getting config, not the target document
This commit is contained in:
@@ -38,7 +38,7 @@ function parseLink(
|
||||
}
|
||||
|
||||
return {
|
||||
uri: OpenDocumentLinkCommand.createCommandUri(resourcePath, tempUri.fragment),
|
||||
uri: OpenDocumentLinkCommand.createCommandUri(document.uri, resourcePath, tempUri.fragment),
|
||||
tooltip: localize('documentLink.tooltip', 'Follow link')
|
||||
};
|
||||
}
|
||||
@@ -183,4 +183,4 @@ export default class LinkProvider implements vscode.DocumentLinkProvider {
|
||||
}
|
||||
return out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -540,7 +540,7 @@ export class MarkdownPreview extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
vscode.commands.executeCommand('_markdown.openDocumentLink', { path, fragment });
|
||||
vscode.commands.executeCommand('_markdown.openDocumentLink', { path, fragment, fromResource: this.resource });
|
||||
}
|
||||
|
||||
private async onCacheImageSizes(imageInfo: { id: string, width: number, height: number }[]) {
|
||||
|
||||
Reference in New Issue
Block a user