mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
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
This commit is contained in:
parent
fcd58b2c63
commit
f7feb8ecbb
|
@ -63,7 +63,7 @@ QString MessageAction::getMessage(QString div)
|
|||
message_ = "";
|
||||
for (QString& s : messageLines)
|
||||
{
|
||||
if (QRegExp("^[ ]*>.*").exactMatch(s))
|
||||
if (QRegExp("^> ?\\w.*").exactMatch(s))
|
||||
message_ += "<span class=quote>" + s + "</span><br/>";
|
||||
else
|
||||
message_ += s + "<br/>";
|
||||
|
|
Loading…
Reference in New Issue
Block a user