From f7feb8ecbb621511a36cb909e4e0bad9f847dfb7 Mon Sep 17 00:00:00 2001 From: Dubslow Date: Mon, 26 Jan 2015 04:17:52 -0600 Subject: [PATCH] Make greentext pickier > must be the first character (i.e. leading whitespace disables greentext) > must be followed by a "word" character, with an optional space (sorry zetok, but this is much more intuitive) > followed by two+ spaces doesn't count Fixes #945 --- src/widget/tool/chatactions/messageaction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget/tool/chatactions/messageaction.cpp b/src/widget/tool/chatactions/messageaction.cpp index 93b8271ee..c0b2980f0 100644 --- a/src/widget/tool/chatactions/messageaction.cpp +++ b/src/widget/tool/chatactions/messageaction.cpp @@ -63,7 +63,7 @@ QString MessageAction::getMessage(QString div) message_ = ""; for (QString& s : messageLines) { - if (QRegExp("^[ ]*>.*").exactMatch(s)) + if (QRegExp("^> ?\\w.*").exactMatch(s)) message_ += "" + s + "
"; else message_ += s + "
";