Revert "Fix double quoting and missing new lines in message sent"

This reverts commit f2cf82ee8e.
This commit is contained in:
Tobias Fella
2022-05-16 20:26:35 +02:00
parent b994907be4
commit 101b57c581

View File

@@ -106,20 +106,7 @@ void ActionsHandler::postMessage(const QString &text,
CustomEmojiModel *cem)
{
QString rawText = text;
auto stringList = text.split(QStringLiteral("```"));
QString cleanedText;
const auto count = stringList.count();
for (int i = 0; i < count; i++) {
if (i % 2 == 0) {
if (i + 1 != count) {
cleanedText += stringList[i].toHtmlEscaped() + QStringLiteral("```");
} else {
cleanedText += stringList[i].toHtmlEscaped();
}
} else {
cleanedText += stringList[i] + QStringLiteral("```");
}
}
QString cleanedText = text.toHtmlEscaped();
auto preprocess = [cem](const QString &it) -> QString {
if (cem == nullptr) {