mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
fix(chat): match hyphen in @name regex
This commit is contained in:
@@ -292,7 +292,7 @@ export default {
|
|||||||
this.$emit('show-member-modal', memberId);
|
this.$emit('show-member-modal', memberId);
|
||||||
},
|
},
|
||||||
atHighlight (text) {
|
atHighlight (text) {
|
||||||
return text.replace(new RegExp(/@\w+\b/g), match => {
|
return text.replace(new RegExp(/@[\w-]+/g), match => {
|
||||||
return `<span class="at-highlight">${match}</span>`;
|
return `<span class="at-highlight">${match}</span>`;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user