From a6dd083a7e071cd78a813acff5e9bdd7a7d81e7d Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 9 May 2022 15:22:44 -0700 Subject: [PATCH] Use `/` for md paths, even on windows (#149120) Fixes #149010 --- .../src/languageFeatures/dropIntoEditor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/markdown-language-features/src/languageFeatures/dropIntoEditor.ts b/extensions/markdown-language-features/src/languageFeatures/dropIntoEditor.ts index 0fda6175da2..c3fb1f55631 100644 --- a/extensions/markdown-language-features/src/languageFeatures/dropIntoEditor.ts +++ b/extensions/markdown-language-features/src/languageFeatures/dropIntoEditor.ts @@ -57,7 +57,7 @@ export function registerDropIntoEditor(selector: vscode.DocumentSelector) { const snippet = new vscode.SnippetString(); uris.forEach((uri, i) => { const mdPath = document.uri.scheme === uri.scheme - ? encodeURI(path.relative(URI.Utils.dirname(document.uri).fsPath, uri.fsPath)) + ? encodeURI(path.relative(URI.Utils.dirname(document.uri).fsPath, uri.fsPath).replace(/\\/g, '/')) : uri.toString(false); const ext = URI.Utils.extname(uri).toLowerCase();