Compare commits

...

2 Commits

Author SHA1 Message Date
Vincent Politzer
ae9bcc8838
Merge bd66db94bd into 3ce11f14ce 2026-01-24 06:07:34 -08:00
Vincent Politzer
bd66db94bd Add check for preceding word 2026-01-24 06:03:16 -08:00

View File

@ -142,8 +142,10 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
self->boldUntilDepth = std::min(self->boldUntilDepth, self->depth);
} else if (matches(name, BLOCK_TAGS, NUM_BLOCK_TAGS)) {
if (strcmp(name, "br") == 0) {
// flush word preceding <br/> to currentTextBlock before calling startNewTextBlock
self->flushPartWordBuffer();
if (self->partWordBufferIndex > 0) {
// flush word preceding <br/> to currentTextBlock before calling startNewTextBlock
self->flushPartWordBuffer();
}
self->startNewTextBlock(self->currentTextBlock->getStyle());
} else {
self->startNewTextBlock((TextBlock::Style)self->paragraphAlignment);