mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
lowercase tags effect marker color
This commit is contained in:
parent
b1093dcc41
commit
846dea24db
@ -31,7 +31,7 @@ export const Layer = (props: LayerProps) => {
|
||||
const getTags = (item: Item) => {
|
||||
console.log(item.text);
|
||||
const regex = /(^|\B)#(?![0-9_]+\b)([a-zA-Z0-9_]{1,30})(\b|\r)/g;
|
||||
const strings = item.text.match(regex);
|
||||
const strings = item.text.toLocaleLowerCase().match(regex);
|
||||
console.log(strings);
|
||||
const tags: Tag[] = [];
|
||||
strings?.map(tag => {
|
||||
|
||||
@ -7,6 +7,7 @@ export function Tags({data} : {data: Tag[]}) {
|
||||
const addTag = useAddTag();
|
||||
useEffect(() => {
|
||||
data.map(tag => {
|
||||
tag.id = tag.id.toLocaleLowerCase();
|
||||
addTag(tag)
|
||||
})
|
||||
}, [addTag, data])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user