feat(import/zip): support root-relative paths

This commit is contained in:
Elian Doran
2025-06-20 20:56:25 +03:00
parent 79b3b92ec9
commit 4a40b22c9a
3 changed files with 34 additions and 21 deletions

View File

@@ -215,7 +215,7 @@ function restoreFromMap(text: string, map: Map<string, string>): string {
}
function processWikiLinks(paragraph: string) {
paragraph = paragraph.replaceAll(/\[\[([^\[\]]+)\]\]/g, `<a class="reference-link" href="$1">$1</a>`);
paragraph = paragraph.replaceAll(/\[\[([^\[\]]+)\]\]/g, `<a class="reference-link" href="/$1">$1</a>`);
return paragraph;
}