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();