Print collection - add missing link/titles for reference-link links (#9489)

This commit is contained in:
Elian Doran
2026-04-19 12:41:03 +03:00
committed by GitHub

View File

@@ -46,11 +46,11 @@ export async function postProcessRichContent(note: FNote | FAttachment, $rendere
const noteIdsToPrefetch = referenceLinks.map((i, el) => getNoteIdFromLink(el));
await froca.getNotes(noteIdsToPrefetch);
for (const el of referenceLinks) {
await Promise.all(referenceLinks.toArray().map(async (el) => {
const innerSpan = document.createElement("span");
await link.loadReferenceLinkTitle($(innerSpan), el.href);
await link.loadReferenceLinkTitle($(innerSpan), el.getAttribute("href"));
el.replaceChildren(innerSpan);
}
}));
await rewriteMermaidDiagramsInContainer($renderedContent[0] as HTMLDivElement);
await formatCodeBlocks($renderedContent);