mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix backslashes escapes
(And shrug losing arms in replies)
This commit is contained in:
parent
c31c440fb7
commit
8d7175b702
1 changed files with 5 additions and 5 deletions
|
@ -461,11 +461,11 @@ InputBar::message(const QString &msg, MarkdownOverride useMarkdown, bool rainbow
|
||||||
text.body = replaceMatrixToMarkdownLink(msg.trimmed()).toStdString();
|
text.body = replaceMatrixToMarkdownLink(msg.trimmed()).toStdString();
|
||||||
|
|
||||||
// Don't send formatted_body, when we don't need to
|
// Don't send formatted_body, when we don't need to
|
||||||
// Specifically, if it includes no html tag and no newlines (which behave differently in
|
// Specifically, if it includes no html tag and no newlines or
|
||||||
// formatted bodies). Probably we forgot something, so this might need to expand at some
|
// backslashes (which behave differently in formatted bodies). Probably
|
||||||
// point.
|
// we forgot something, so this might need to expand at some point.
|
||||||
if (text.formatted_body.find('<') == std::string::npos &&
|
if (text.formatted_body.find('<') == std::string::npos &&
|
||||||
text.body.find('\n') == std::string::npos)
|
text.body.find('\n') == std::string::npos && text.body.find('\\') == std::string::npos)
|
||||||
text.formatted_body = "";
|
text.formatted_body = "";
|
||||||
else
|
else
|
||||||
text.format = "org.matrix.custom.html";
|
text.format = "org.matrix.custom.html";
|
||||||
|
@ -880,7 +880,7 @@ InputBar::command(const QString &command, QString args)
|
||||||
err->matrix_error.error);
|
err->matrix_error.error);
|
||||||
});
|
});
|
||||||
} else if (command == QLatin1String("shrug")) {
|
} else if (command == QLatin1String("shrug")) {
|
||||||
message("¯\\_(ツ)_/¯" + (args.isEmpty() ? QLatin1String("") : " " + args));
|
message("¯\\\\\\_(ツ)\\_/¯" + (args.isEmpty() ? QLatin1String("") : " " + args));
|
||||||
} else if (command == QLatin1String("fliptable")) {
|
} else if (command == QLatin1String("fliptable")) {
|
||||||
message(QStringLiteral("(╯°□°)╯︵ ┻━┻"));
|
message(QStringLiteral("(╯°□°)╯︵ ┻━┻"));
|
||||||
} else if (command == QLatin1String("unfliptable")) {
|
} else if (command == QLatin1String("unfliptable")) {
|
||||||
|
|
Loading…
Reference in a new issue