Skip to content

Commit 0570a76

Browse files
authored
Use posix path for markdown links (microsoft#164822)
Fixes microsoft#164782
1 parent 122c13d commit 0570a76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/markdown-language-features/src/languageFeatures/dropIntoEditor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function createUriListSnippet(document: vscode.TextDocument, uris: readon
8181
const snippet = new vscode.SnippetString();
8282
uris.forEach((uri, i) => {
8383
const mdPath = dir && dir.scheme === uri.scheme && dir.authority === uri.authority
84-
? encodeURI(path.relative(dir.fsPath, uri.fsPath).replace(/\\/g, '/'))
84+
? encodeURI(path.posix.relative(dir.path, uri.path))
8585
: uri.toString(false);
8686

8787
const ext = URI.Utils.extname(uri).toLowerCase().replace('.', '');

0 commit comments

Comments
 (0)