Revert "Fix double quoting and missing new lines in message sent"
This reverts commit f2cf82ee8e.
This commit is contained in:
@@ -106,20 +106,7 @@ void ActionsHandler::postMessage(const QString &text,
|
|||||||
CustomEmojiModel *cem)
|
CustomEmojiModel *cem)
|
||||||
{
|
{
|
||||||
QString rawText = text;
|
QString rawText = text;
|
||||||
auto stringList = text.split(QStringLiteral("```"));
|
QString cleanedText = text.toHtmlEscaped();
|
||||||
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("```");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
auto preprocess = [cem](const QString &it) -> QString {
|
auto preprocess = [cem](const QString &it) -> QString {
|
||||||
if (cem == nullptr) {
|
if (cem == nullptr) {
|
||||||
|
|||||||
Reference in New Issue
Block a user