From dfb0bb75f4419bbc58d668401f6daedcd1f00b60 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sun, 21 Dec 2025 18:07:46 +0100 Subject: [PATCH] Fix missing escape sequence in /shrug command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before the fix, the upper arm _ characters in the command's output would be parsed as Markdown italic formatting around the (ツ). (cherry picked from commit 706f1f7836c6fbabb399af2dc61514f71fe578b5) Co-authored-by: Veres Károly --- autotests/actionstest.cpp | 2 +- src/libneochat/models/actionsmodel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autotests/actionstest.cpp b/autotests/actionstest.cpp index 9b9775bea..0ab7709b5 100644 --- a/autotests/actionstest.cpp +++ b/autotests/actionstest.cpp @@ -63,7 +63,7 @@ void ActionsTest::testActions_data() QTest::addColumn>("resultText"); QTest::addColumn>("type"); - QTest::newRow("shrug") << u"/shrug Hello"_s << std::make_optional(u"¯\\\\_(ツ)_/¯ Hello"_s) + QTest::newRow("shrug") << u"/shrug Hello"_s << std::make_optional(u"¯\\\\\\_(ツ)\\_/¯ Hello"_s) << std::make_optional(Quotient::RoomMessageEvent::MsgType::Text); QTest::newRow("lenny") << u"/lenny Hello"_s << std::make_optional(u"( ͡° ͜ʖ ͡°) Hello"_s) << std::make_optional(Quotient::RoomMessageEvent::MsgType::Text); QTest::newRow("tableflip") << u"/tableflip Hello"_s << std::make_optional(u"(╯°□°)╯︵ ┻━┻ Hello"_s) diff --git a/src/libneochat/models/actionsmodel.cpp b/src/libneochat/models/actionsmodel.cpp index 4c05473e1..f96f155aa 100644 --- a/src/libneochat/models/actionsmodel.cpp +++ b/src/libneochat/models/actionsmodel.cpp @@ -59,7 +59,7 @@ QList actions{ Action{ u"shrug"_s, [](const QString &message, NeoChatRoom *, ChatBarCache *) { - return u"¯\\\\_(ツ)_/¯ %1"_s.arg(message); + return u"¯\\\\\\_(ツ)\\_/¯ %1"_s.arg(message); }, Quotient::RoomMessageEvent::MsgType::Text, kli18n(""),