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()); - } } } }