diff --git a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp
index 8f74612b..6925d0aa 100644
--- a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp
+++ b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp
@@ -995,13 +995,20 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
}
if (cssStyle.hasTextDecoration()) {
const uint8_t dec = static_cast(cssStyle.textDecoration);
- if (dec & static_cast(CssTextDecoration::Underline)) {
+ if (dec == static_cast(CssTextDecoration::None)) {
entry.hasUnderline = true;
- entry.underline = true;
- }
- if (dec & static_cast(CssTextDecoration::LineThrough)) {
+ entry.underline = false;
entry.hasStrikethrough = true;
- entry.strikethrough = true;
+ entry.strikethrough = false;
+ } else {
+ if (dec & static_cast(CssTextDecoration::Underline)) {
+ entry.hasUnderline = true;
+ entry.underline = true;
+ }
+ if (dec & static_cast(CssTextDecoration::LineThrough)) {
+ entry.hasStrikethrough = true;
+ entry.strikethrough = true;
+ }
}
}
self->inlineStyleStack.push_back(entry);