From a73c7218cc6448ba2cd6648705e87933fa30cac6 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Tue, 18 Jul 2023 01:42:42 +0900 Subject: [PATCH] (fix) content A: recognize relative paths --- components/content/ProseA.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/content/ProseA.vue b/components/content/ProseA.vue index 0080af8b..433a98cf 100644 --- a/components/content/ProseA.vue +++ b/components/content/ProseA.vue @@ -31,7 +31,11 @@ try { } } catch(_) { if(realHref !== '') { - realHref = localePath(realHref); + if (!realHref.startsWith('.') || !realHref.startsWith('http')) { + realHref = localePath(realHref); + } else { + realHref = '../' + realHref; + } } }