mirror of
https://github.com/zadam/trilium.git
synced 2026-05-06 09:36:37 +02:00
Revert "fix(print): add missing note title for links (content renderer aware of printing)"
This reverts commit 62a8fb2228.
This commit is contained in:
@@ -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"]);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user