Fix missing escape sequence in /shrug command
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 706f1f7836)
Co-authored-by: Veres Károly <mail+kde@karcsesz.hu>
This commit is contained in:
@@ -63,7 +63,7 @@ void ActionsTest::testActions_data()
|
|||||||
QTest::addColumn<std::optional<QString>>("resultText");
|
QTest::addColumn<std::optional<QString>>("resultText");
|
||||||
QTest::addColumn<std::optional<Quotient::RoomMessageEvent::MsgType>>("type");
|
QTest::addColumn<std::optional<Quotient::RoomMessageEvent::MsgType>>("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);
|
<< 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("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)
|
QTest::newRow("tableflip") << u"/tableflip Hello"_s << std::make_optional(u"(╯°□°)╯︵ ┻━┻ Hello"_s)
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ QList<ActionsModel::Action> actions{
|
|||||||
Action{
|
Action{
|
||||||
u"shrug"_s,
|
u"shrug"_s,
|
||||||
[](const QString &message, NeoChatRoom *, ChatBarCache *) {
|
[](const QString &message, NeoChatRoom *, ChatBarCache *) {
|
||||||
return u"¯\\\\_(ツ)_/¯ %1"_s.arg(message);
|
return u"¯\\\\\\_(ツ)\\_/¯ %1"_s.arg(message);
|
||||||
},
|
},
|
||||||
Quotient::RoomMessageEvent::MsgType::Text,
|
Quotient::RoomMessageEvent::MsgType::Text,
|
||||||
kli18n("<message>"),
|
kli18n("<message>"),
|
||||||
|
|||||||
Reference in New Issue
Block a user