mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 09:39:23 +00:00
Merge pull request #1868 from snicker/develop
chat highlights work properly when preceeded by spaces again
This commit is contained in:
commit
6fc848270f
1 changed files with 1 additions and 1 deletions
|
|
@ -136,7 +136,7 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Groups', '$http', 'A
|
|||
var messagetext = message.text.toLowerCase();
|
||||
var username = user.profile.name;
|
||||
var mentioned = messagetext.indexOf(username.toLowerCase());
|
||||
var pattern = "(\s|@|^){1}"+username+"([^\w]|$){1}";
|
||||
var pattern = username+"([^\w]|$){1}";
|
||||
if(mentioned > -1) {
|
||||
var preceedingchar = messagetext.substring(mentioned-1,mentioned);
|
||||
if(mentioned == 0 || preceedingchar.trim() == '' || preceedingchar == '@'){
|
||||
|
|
|
|||
Loading…
Reference in a new issue