mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-23 12:37:23 +00:00
Fix bug in colorRegex() that was highighting usernames in the middle of strings when a user wasn't actually being mentioned
This commit is contained in:
2
main.go
2
main.go
@ -407,7 +407,7 @@ func formatChannel(ch keybase.Channel) StyledString {
|
||||
}
|
||||
|
||||
func colorReplaceMentionMe(msg StyledString) StyledString {
|
||||
return msg.colorRegex("(@?"+k.Username+")", mentionColor)
|
||||
return msg.colorRegex(`(@?\b`+k.Username+`\b)`, mentionColor)
|
||||
}
|
||||
func colorUsername(username string) StyledString {
|
||||
var color = messageSenderDefaultColor
|
||||
|
||||
Reference in New Issue
Block a user