mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-27 21:52:59 +00:00
Handle normalized absolute file paths on markdown preview link click (#116649)
* Handle normalized absolute file paths on markdown preview link click #115812 * Parse file path using vscode.Uri
This commit is contained in:
@@ -439,6 +439,9 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
|
||||
if (hrefPath[0] !== '/') {
|
||||
// Fix #93691, use this.resource.fsPath instead of this.resource.path
|
||||
hrefPath = path.join(path.dirname(this.resource.fsPath), hrefPath);
|
||||
} else {
|
||||
// Handle any normalized file paths
|
||||
hrefPath = vscode.Uri.parse(hrefPath.replace('/file', '')).fsPath;
|
||||
}
|
||||
|
||||
const config = vscode.workspace.getConfiguration('markdown', this.resource);
|
||||
|
||||
Reference in New Issue
Block a user