thx @coderabbitai

This commit is contained in:
Zach Nelson
2026-04-16 01:06:30 -05:00
parent 3e9a616988
commit 187066c714
@@ -454,7 +454,8 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
// Create page for image - only break if image won't fit remaining space
if (self->currentPage && !self->currentPage->elements.empty() &&
(self->currentPageNextY + imageMarginTop + displayHeight > self->viewportHeight)) {
(self->currentPageNextY + imageMarginTop + displayHeight + imageMarginBottom >
self->viewportHeight)) {
self->completePageFn(std::move(self->currentPage));
self->completedPageCount++;
self->currentPage.reset(new Page());