Merge branch 'develop' of https://github.com/HabitRPG/habitica into autocomplete-username

# Conflicts:
#	package.json
This commit is contained in:
Phillip Thelen
2019-02-05 16:48:06 +01:00
822 changed files with 42809 additions and 36958 deletions

View File

@@ -307,7 +307,9 @@ export default {
this.$emit('show-member-modal', memberId);
},
atHighlight (text) {
const userRegex = new RegExp(`@(${this.user.auth.local.username}|${this.user.profile.name})(?:\\b)`, 'gi');
const escapedDisplayName = escapeRegExp(this.user.profile.name);
const escapedUsername = escapeRegExp(this.user.auth.local.username);
const userRegex = new RegExp(`@(${escapedDisplayName}|${escapedUsername})(?:\\b)`, 'gi');
const atRegex = new RegExp(/(?!\b)@[\w-]+/g);
if (userRegex.test(text)) {