fix(print): don't skip child notes if parent note has to be skipped

This commit is contained in:
Elian Doran 2025-12-24 17:55:30 +02:00
parent 66cdee82a4
commit 2afc8d181d
No known key found for this signature in database

View File

@ -23,19 +23,19 @@ export function ListPrintView({ note, noteIds: unfilteredNoteIds, onReady, onPro
const notesWithContent: NotesWithContent[] = []; const notesWithContent: NotesWithContent[] = [];
async function processNote(note: FNote, depth: number) { async function processNote(note: FNote, depth: number) {
if (!isNotePrintable(note)) return; if (isNotePrintable(note)) {
const content = await content_renderer.getRenderedContent(note, {
trim: false,
noChildrenList: true
});
const content = await content_renderer.getRenderedContent(note, { const contentEl = content.$renderedContent[0];
trim: false,
noChildrenList: true
});
const contentEl = content.$renderedContent[0]; insertPageTitle(contentEl, note.title);
rewriteHeadings(contentEl, depth);
insertPageTitle(contentEl, note.title); noteIdsSet.add(note.noteId);
rewriteHeadings(contentEl, depth); notesWithContent.push({ note, contentEl });
noteIdsSet.add(note.noteId); }
notesWithContent.push({ note, contentEl });
if (onProgressChanged) { if (onProgressChanged) {
onProgressChanged(notesWithContent.length / noteIdsWithChildren.length); onProgressChanged(notesWithContent.length / noteIdsWithChildren.length);