Match tags with hash

This commit is contained in:
James Grugett 2022-02-01 11:02:30 -06:00
parent 4e1174a4dc
commit 79c5472c11

View File

@ -21,7 +21,7 @@ export function parseTags(text: string) {
export function parseWordsAsTags(text: string) {
const taggedText = text
.split(/\s+/)
.map((tag) => `#${tag}`)
.map((tag) => (tag.startsWith('#') ? tag : `#${tag}`))
.join(' ')
return parseTags(taggedText)
}