@ -166,7 +166,7 @@ function extractHashtags(fragments: Fragment[]) {
|
|||||||
.map(f => {
|
.map(f => {
|
||||||
if (typeof f === "string") {
|
if (typeof f === "string") {
|
||||||
return f.split(HashtagRegex).map(i => {
|
return f.split(HashtagRegex).map(i => {
|
||||||
if (i.toLowerCase().startsWith("#")) {
|
if (i.match(HashtagRegex)) {
|
||||||
return {
|
return {
|
||||||
type: "hashtag",
|
type: "hashtag",
|
||||||
content: i.substring(1),
|
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;
|
return frags;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user