Skip to content

Commit eee496a

Browse files
committed
chore(print/list): get rid of inner div
1 parent 89a83a6 commit eee496a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

apps/client/src/widgets/collections/legacy/ListPrintView.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { useFilteredNoteIds } from "./utils";
88

99
interface NotesWithContent {
1010
note: FNote;
11-
content: string;
11+
content: { __html: string };
1212
}
1313

1414
export function ListPrintView({ note, noteIds: unfilteredNoteIds, onReady }: ViewModeProps<{}>) {
@@ -30,7 +30,7 @@ export function ListPrintView({ note, noteIds: unfilteredNoteIds, onReady }: Vie
3030
insertPageTitle(contentEl, note.title);
3131
rewriteHeadings(contentEl, depth);
3232

33-
notesWithContent.push({ note, content: contentEl.innerHTML });
33+
notesWithContent.push({ note, content: { __html: contentEl.innerHTML } });
3434

3535
if (note.hasChildren()) {
3636
const imageLinks = note.getRelations("imageLink");
@@ -61,9 +61,7 @@ export function ListPrintView({ note, noteIds: unfilteredNoteIds, onReady }: Vie
6161
<h1>{note.title}</h1>
6262

6363
{notesWithContent?.map(({ note: childNote, content }) => (
64-
<section id={`note-${childNote.noteId}`} class="note">
65-
<RawHtmlBlock html={content} />
66-
</section>
64+
<section id={`note-${childNote.noteId}`} class="note" dangerouslySetInnerHTML={content} />
6765
))}
6866
</div>
6967
</div>

0 commit comments

Comments
 (0)