Commit b7521bad authored by poixen's avatar poixen
Browse files

Merge pull request #620 from poixen/mention_punctuation

Check for non-characters
parents 4c418bc9 78edb8c6
......@@ -203,7 +203,7 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use
}
// another user has been mentioned
else {
int mentionEndIndex = message.indexOf(" ");
int mentionEndIndex = message.indexOf(QRegExp("\\W"), 1);// from 1 as @ is non-char
if (mentionEndIndex == -1)
mentionEndIndex = message.size(); // there is no text after the mention
QString userMention = message.left(mentionEndIndex);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment