Revert "fix(print): add missing note title for links (content renderer aware of printing)"

This reverts commit 62a8fb2228.
This commit is contained in:
contributor
2026-04-18 21:59:08 +03:00
parent 62a8fb2228
commit 4579e4d31b
3 changed files with 4 additions and 10 deletions

View File

@@ -35,7 +35,6 @@ export interface RenderOptions {
/** Set of note IDs that have already been seen during rendering to prevent infinite recursion. */
seenNoteIds?: Set<string>;
showTextRepresentation?: boolean;
isPrinting?: boolean;
}
const CODE_MIME_TYPES = new Set(["application/json"]);

View File

@@ -47,13 +47,9 @@ export async function postProcessRichContent(note: FNote | FAttachment, $rendere
await froca.getNotes(noteIdsToPrefetch);
for (const el of referenceLinks) {
if (options.isPrinting) {
await link.loadReferenceLinkTitle($(el));
} else {
const innerSpan = document.createElement("span");
await link.loadReferenceLinkTitle($(innerSpan), el.href);
el.replaceChildren(innerSpan);
}
const innerSpan = document.createElement("span");
await link.loadReferenceLinkTitle($(innerSpan), el.href);
el.replaceChildren(innerSpan);
}
await rewriteMermaidDiagramsInContainer($renderedContent[0] as HTMLDivElement);

View File

@@ -31,8 +31,7 @@ export function ListPrintView({ note, noteIds: unfilteredNoteIds, onReady, onPro
if (isNotePrintable(note)) {
const content = await content_renderer.getRenderedContent(note, {
trim: false,
noChildrenList: true,
isPrinting: true
noChildrenList: true
});
const contentEl = content.$renderedContent[0];