Give highlights a little padding
This commit is contained in:
parent
7b11c65187
commit
4c497454b6
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user