fix: hashtag parser
Some checks are pending
continuous-integration/drone/push Build is running

closes #728
This commit is contained in:
kieran 2024-04-12 11:19:25 +01:00
parent 5c5c31aadf
commit 9a88b52b25
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -166,7 +166,7 @@ function extractHashtags(fragments: Fragment[]) {
.map(f => {
if (typeof f === "string") {
return f.split(HashtagRegex).map(i => {
if (i.toLowerCase().startsWith("#")) {
if (i.match(HashtagRegex)) {
return {
type: "hashtag",
content: i.substring(1),
@ -336,5 +336,8 @@ export function transformText(body: string, tags: Array<Array<string>>) {
}
}
}
if(frags.some(a => a.type==="hashtag")) {
console.debug(frags);
}
return frags;
}