Fixes #970
parent
7fa1aabf3e
commit
b560c0dcc8
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue