1
0
forked from Kieran/snort

bug: dont replace hashtag with tag reference

This commit is contained in:
Kieran 2023-01-20 16:56:05 +00:00
parent fd29dcd222
commit 8ab20fb6bb
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -58,7 +58,7 @@ export default function useEventPublisher() {
const tag = match.slice(1); const tag = match.slice(1);
const idx = ev.Tags.length; const idx = ev.Tags.length;
ev.Tags.push(new Tag(["t", tag.toLowerCase()], idx)); ev.Tags.push(new Tag(["t", tag.toLowerCase()], idx));
return `#[${idx}]`; return match;
} }
let content = msg.replace(/@npub[a-z0-9]+/g, replaceNpub); let content = msg.replace(/@npub[a-z0-9]+/g, replaceNpub);
content = content.replace(HashtagRegex, replaceHashtag); content = content.replace(HashtagRegex, replaceHashtag);