mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Fix to 'Markdown Preview of relative links drops 'host' from path' (#95092)
* Fix #93691 * Fix #93961
This commit is contained in:
committed by
GitHub
parent
061f4967f9
commit
b5136c0c79
@@ -393,7 +393,8 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
|
||||
// We perviously already resolve absolute paths.
|
||||
// Now make sure we handle relative file paths
|
||||
if (hrefPath[0] !== '/') {
|
||||
hrefPath = path.join(path.dirname(this.resource.path), hrefPath);
|
||||
// Fix #93691, use this.resource.fsPath instead of this.resource.path
|
||||
hrefPath = path.join(path.dirname(this.resource.fsPath), hrefPath);
|
||||
}
|
||||
|
||||
const config = vscode.workspace.getConfiguration('markdown', this.resource);
|
||||
|
||||
Reference in New Issue
Block a user