misc: split tags by commas
This commit is contained in:
1 parent
9979c48d2e
commit
8fb1777bbb
1 file changed
+9
-5
@@ -19,11 +19,15 @@
|
||||
let extracted: Tag[] = []
|
||||
|
||||
title = title.replace(/\[(.*?)\]/g, (match, content) => {
|
||||
extracted.push(
|
||||
textToTag.get(content) ?? {
|
||||
content: content,
|
||||
}
|
||||
)
|
||||
const contents = content.split(',').map((part: string) => part.trim())
|
||||
|
||||
contents.forEach((content: string) => {
|
||||
extracted.push(
|
||||
textToTag.get(content) ?? {
|
||||
content: content,
|
||||
}
|
||||
)
|
||||
})
|
||||
return ''
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user