diff --git a/src/lib/components/Editor.svelte b/src/lib/components/Editor.svelte index 62d98ae..0143693 100644 --- a/src/lib/components/Editor.svelte +++ b/src/lib/components/Editor.svelte @@ -2793,7 +2793,8 @@ // Standard markdown: resolve relative paths against the note's directory const notePath = $activeNotePath; 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}`)); } // Last fallback: vault root