fix regex
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
b21ce6ee5e
commit
70bd6cafd4
|
@ -264,7 +264,7 @@
|
||||||
|
|
||||||
// replace every mention either at the start of the input or after a whitespace
|
// replace every mention either at the start of the input or after a whitespace
|
||||||
// followed by a non-word character.
|
// followed by a non-word character.
|
||||||
message = message.replace(new RegExp("(^|\\s)(" + mention + ")(\\b|?![_-@.])", 'g'),
|
message = message.replace(new RegExp("(^|\\s)(" + mention + ")\\b", 'g'),
|
||||||
function(match, p1) {
|
function(match, p1) {
|
||||||
// to get number of whitespaces (0 vs 1) right
|
// to get number of whitespaces (0 vs 1) right
|
||||||
return p1+displayName;
|
return p1+displayName;
|
||||||
|
|
Loading…
Reference in New Issue