Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Give highlights a little padding

Gabe Kangas2a2bfa01fd03
diff --git a/webroot/js/utils/chat.js b/webroot/js/utils/chat.js
index 89f0f8f530..e78fd216c5 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, '<span class="highlighted font-bold bg-orange-500">$&</span>');
+ return message.replace(
+ pattern,
+ '<span class="highlighted px-1 rounded font-bold bg-orange-500">$&</span>'
+ );
}
function linkify(text, rawText) {