Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
2902d857
Commit
2902d857
authored
Apr 20, 2015
by
poixen
Browse files
Merge pull request #983 from poixen/mention_fix
Mentions will now work with all legal chars
parents
118bc06a
2d34bfeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/chatview.cpp
View file @
2902d857
...
...
@@ -247,7 +247,7 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use
showSystemPopup
(
ref
);
}
}
else
{
int
mentionEndIndex
=
message
.
indexOf
(
QRegExp
(
"
\\
W
"
),
1
);
// from 1 as @ is non-char
int
mentionEndIndex
=
message
.
indexOf
(
QRegExp
(
"
\\
s
"
),
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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment