chore(print/list): get rid of inner div

This commit is contained in:
Elian Doran 2025-11-20 20:59:34 +02:00
parent 89a83a625b
commit eee496a050
No known key found for this signature in database

View File

@ -8,7 +8,7 @@ import { useFilteredNoteIds } from "./utils";
interface NotesWithContent { interface NotesWithContent {
note: FNote; note: FNote;
content: string; content: { __html: string };
} }
export function ListPrintView({ note, noteIds: unfilteredNoteIds, onReady }: ViewModeProps<{}>) { export function ListPrintView({ note, noteIds: unfilteredNoteIds, onReady }: ViewModeProps<{}>) {
@ -30,7 +30,7 @@ export function ListPrintView({ note, noteIds: unfilteredNoteIds, onReady }: Vie
insertPageTitle(contentEl, note.title); insertPageTitle(contentEl, note.title);
rewriteHeadings(contentEl, depth); rewriteHeadings(contentEl, depth);
notesWithContent.push({ note, content: contentEl.innerHTML }); notesWithContent.push({ note, content: { __html: contentEl.innerHTML } });
if (note.hasChildren()) { if (note.hasChildren()) {
const imageLinks = note.getRelations("imageLink"); const imageLinks = note.getRelations("imageLink");
@ -61,9 +61,7 @@ export function ListPrintView({ note, noteIds: unfilteredNoteIds, onReady }: Vie
<h1>{note.title}</h1> <h1>{note.title}</h1>
{notesWithContent?.map(({ note: childNote, content }) => ( {notesWithContent?.map(({ note: childNote, content }) => (
<section id={`note-${childNote.noteId}`} class="note"> <section id={`note-${childNote.noteId}`} class="note" dangerouslySetInnerHTML={content} />
<RawHtmlBlock html={content} />
</section>
))} ))}
</div> </div>
</div> </div>