diff --git a/src/main/ipcHandlers.ts b/src/main/ipcHandlers.ts index 3d1ec2f..cca6a96 100644 --- a/src/main/ipcHandlers.ts +++ b/src/main/ipcHandlers.ts @@ -307,9 +307,11 @@ export function registerIpcHandlers(): void { needsPageBreak = false } + const chapterTitle = doc.relativePath.split('/').pop() ?? doc.relativePath + const safeChapterTitle = chapterTitle.replace(/&/g, '&').replace(/${contentHtml}` + bodyHtml += `