From ea55e6ec47e8f57f617023596db3f3f62df5eaee Mon Sep 17 00:00:00 2001 From: Zach Nelson Date: Thu, 16 Apr 2026 00:44:56 -0500 Subject: [PATCH] fix: remove empty-block restore that wiped deposited bottom margins --- lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp index bdab57594..447097adc 100644 --- a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp +++ b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp @@ -1020,11 +1020,6 @@ void XMLCALL ChapterHtmlSlimParser::endElement(void* userData, const XML_Char* n self->currentTextBlock->getBlockStyle().addBottom(self->blockStyleStack.back())); } self->blockStyleStack.pop_back(); - // Restore parent's accumulated style on empty blocks to prevent the closed - // element's styles from bleeding into the next sibling. - if (self->currentTextBlock && self->currentTextBlock->isEmpty()) { - self->currentTextBlock->setBlockStyle(self->blockStyleStack.back().withoutBottom()); - } } } }