diff --git a/webroot/js/utils/chat.js b/webroot/js/utils/chat.js index 89f0f8f53..e78fd216c 100644 --- a/webroot/js/utils/chat.js +++ b/webroot/js/utils/chat.js @@ -24,7 +24,10 @@ export function formatMessageText(message, username) { function highlightUsername(message, username) { const pattern = new RegExp('@?' + username.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'gi'); - return message.replace(pattern, '$&'); + return message.replace( + pattern, + '$&' + ); } function linkify(text, rawText) {