Fix discarded CSS text-align

This commit is contained in:
jpirnay
2026-03-28 10:39:30 +01:00
parent 5b43639f98
commit 69dbfa4b8a
@@ -577,7 +577,12 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
self->startNewTextBlock(self->currentTextBlock->getBlockStyle());
} else {
self->currentCssStyle = cssStyle;
self->startNewTextBlock(userAlignmentBlockStyle);
auto blockStyle = userAlignmentBlockStyle;
if (self->embeddedStyle && cssStyle.hasTextAlign()) {
blockStyle.alignment = cssStyle.textAlign;
blockStyle.textAlignDefined = true;
}
self->startNewTextBlock(blockStyle);
self->updateEffectiveInlineStyle();
if (strcmp(name, "li") == 0) {