mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Always add dirname of current md document to localResourceRoots
Fixes #139907 Previously we only added this dir on `file` file system
This commit is contained in:
@@ -463,14 +463,13 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
|
||||
if (workspaceRoots) {
|
||||
baseRoots.push(...workspaceRoots);
|
||||
}
|
||||
} else if (!this._resource.scheme || this._resource.scheme === 'file') {
|
||||
baseRoots.push(vscode.Uri.file(path.dirname(this._resource.fsPath)));
|
||||
} else {
|
||||
baseRoots.push(this._resource.with({ path: path.dirname(this._resource.path) }));
|
||||
}
|
||||
|
||||
return baseRoots;
|
||||
}
|
||||
|
||||
|
||||
private async onDidClickPreviewLink(href: string) {
|
||||
const targetResource = resolveDocumentLink(href, this.resource);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user