Fixes #970
parent
7fa1aabf3e
commit
b560c0dcc8
|
@ -573,9 +573,8 @@ export function renderMarkdownToHtml(
|
||||||
t.attrs!.href = options.translateUrls!(t.attrs!.href, "link");
|
t.attrs!.href = options.translateUrls!(t.attrs!.href, "link");
|
||||||
}
|
}
|
||||||
if (t.attrs!["data-ref"]?.length) {
|
if (t.attrs!["data-ref"]?.length) {
|
||||||
const pageMeta = allPages.find((p) =>
|
const pageRef = parsePageRef(t.attrs!["data-ref"]!);
|
||||||
t.attrs!["data-ref"]!.startsWith(p.name)
|
const pageMeta = allPages.find((p) => pageRef.page === p.name);
|
||||||
);
|
|
||||||
if (pageMeta) {
|
if (pageMeta) {
|
||||||
t.body = [(pageMeta.pageDecoration?.prefix ?? "") + t.body];
|
t.body = [(pageMeta.pageDecoration?.prefix ?? "") + t.body];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue