mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-07-24 07:45:57 +02:00
Fix Windows relative image resolution (#215)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user