pull/974/head
Zef Hemel 2024-07-24 07:03:27 +02:00
parent 7fa1aabf3e
commit b560c0dcc8
1 changed files with 2 additions and 3 deletions

View File

@ -573,9 +573,8 @@ export function renderMarkdownToHtml(
t.attrs!.href = options.translateUrls!(t.attrs!.href, "link");
}
if (t.attrs!["data-ref"]?.length) {
const pageMeta = allPages.find((p) =>
t.attrs!["data-ref"]!.startsWith(p.name)
);
const pageRef = parsePageRef(t.attrs!["data-ref"]!);
const pageMeta = allPages.find((p) => pageRef.page === p.name);
if (pageMeta) {
t.body = [(pageMeta.pageDecoration?.prefix ?? "") + t.body];
}