diff --git a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp index 22023926..67e1ef94 100644 --- a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp +++ b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp @@ -402,9 +402,7 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char* self->flushPartWordBuffer(); } if (self->currentTextBlock && !self->currentTextBlock->isEmpty()) { - self->makePages(); - self->currentTextBlock.reset(); - self->wordsExtractedInBlock = 0; + self->startNewTextBlock(BlockStyle()); } // Create page for image - only break if image won't fit remaining space