Correct CSS property for underline style

Change 'font-decoration' to 'text-decoration' in HTMLDecoder.cpp.
'font-decoration' is not a valid CSS property, while 'text-decoration'
is the correct property for adding underline to text.
This commit is contained in:
lzwind lzwind
2025-03-01 23:31:55 +00:00
committed by Kurt Hindenburg
parent e62050b035
commit 11ec321de8
2 changed files with 2 additions and 2 deletions

View File

@@ -89,7 +89,7 @@ void TerminalCharacterDecoderTest::testHTMLDecoder_data()
// The below is wrong; only the first rendition is used (eg ignores the |)
QTest::newRow("simple text with underline and italic rendition")
<< "hello" << QVector<RenditionFlags>(6).fill(RE_UNDERLINE_BIT | RE_ITALIC)
<< R"(<span style="font-family:monospace"><span style="font-decoration:underline;color:#000000;background-color:#ffffff;">hello</span><br></span>)";
<< R"(<span style="font-family:monospace"><span style="text-decoration:underline;color:#000000;background-color:#ffffff;">hello</span><br></span>)";
QTest::newRow("text with &")
<< "hello &there" << QVector<RenditionFlags>(6).fill(DEFAULT_RENDITION)

View File

@@ -77,7 +77,7 @@ void HTMLDecoder::decodeLine(const Character *const characters, int count, LineP
}
if ((_lastRendition & RE_UNDERLINE_MASK) != 0) {
style.append(QLatin1String("font-decoration:underline;"));
style.append(QLatin1String("text-decoration:underline;"));
}
style.append(QStringLiteral("color:%1;").arg(_lastForeColor.color(_colorTable).name()));