Match tags with hash
This commit is contained in:
parent
4e1174a4dc
commit
79c5472c11
|
@ -21,7 +21,7 @@ export function parseTags(text: string) {
|
||||||
export function parseWordsAsTags(text: string) {
|
export function parseWordsAsTags(text: string) {
|
||||||
const taggedText = text
|
const taggedText = text
|
||||||
.split(/\s+/)
|
.split(/\s+/)
|
||||||
.map((tag) => `#${tag}`)
|
.map((tag) => (tag.startsWith('#') ? tag : `#${tag}`))
|
||||||
.join(' ')
|
.join(' ')
|
||||||
return parseTags(taggedText)
|
return parseTags(taggedText)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user