From 11ec321de8294afea0bf6a296ce4ff41406c705b Mon Sep 17 00:00:00 2001 From: lzwind lzwind Date: Sat, 1 Mar 2025 23:31:55 +0000 Subject: [PATCH] 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. --- src/autotests/TerminalCharacterDecoderTest.cpp | 2 +- src/decoders/HTMLDecoder.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/autotests/TerminalCharacterDecoderTest.cpp b/src/autotests/TerminalCharacterDecoderTest.cpp index 98f2a553e..58c9f7618 100644 --- a/src/autotests/TerminalCharacterDecoderTest.cpp +++ b/src/autotests/TerminalCharacterDecoderTest.cpp @@ -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(6).fill(RE_UNDERLINE_BIT | RE_ITALIC) - << R"(hello
)"; + << R"(hello
)"; QTest::newRow("text with &") << "hello &there" << QVector(6).fill(DEFAULT_RENDITION) diff --git a/src/decoders/HTMLDecoder.cpp b/src/decoders/HTMLDecoder.cpp index c04856188..eccef6298 100644 --- a/src/decoders/HTMLDecoder.cpp +++ b/src/decoders/HTMLDecoder.cpp @@ -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()));