Fix Windows relative image resolution (#215)

This commit is contained in:
Yuri Karamian
2026-07-20 02:47:11 +02:00
parent 8769b56fd1
commit 4aa0b200b9
+2 -1
View File
@@ -2793,7 +2793,8 @@
// Standard markdown: resolve relative paths against the note's directory // Standard markdown: resolve relative paths against the note's directory
const notePath = $activeNotePath; const notePath = $activeNotePath;
if (notePath) { if (notePath) {
const noteDir = notePath.substring(0, notePath.lastIndexOf('/')); const normalizedNotePath = notePath.replace(/\\/g, '/');
const noteDir = normalizedNotePath.substring(0, normalizedNotePath.lastIndexOf('/'));
return convertFileSrc(normalizePath(`${noteDir}/${decoded}`)); return convertFileSrc(normalizePath(`${noteDir}/${decoded}`));
} }
// Last fallback: vault root // Last fallback: vault root