mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
#tags not case sensitive
This commit is contained in:
parent
bd57c87e95
commit
cf34e815b6
@ -10,7 +10,7 @@ export function heighlightTags(message: string, tags: Tag[]): string {
|
||||
message = message.replace(hashTagRegex, function (string) {
|
||||
console.log(string);
|
||||
|
||||
const tag = tags.find(t => t.id == string.slice(1))
|
||||
const tag = tags.find(t => t.id.toLowerCase() == string.slice(1).toLowerCase())
|
||||
return `<span style="background-color: ${tag ? tag.color : '#aaa' };padding: 0px 5px;border-radius: 7px;cursor: pointer;color:#fff">` + string + '</span>'
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user