Removed global flag when testing for profile regex. This fixes some issues when detecting profiles with nostr: prefix

This commit is contained in:
Nikola Lukovic 2023-10-19 16:33:34 +02:00
parent 22c4188e6a
commit e04294e0d6
No known key found for this signature in database
GPG Key ID: E732B8290767CE3B

View File

@ -251,7 +251,7 @@ export const hashtagRegex = /(?:\s|^)#[^\s!@#$%^&*(),.?":{}|<>]+/i;
export const linebreakRegex = /(\r\n|\r|\n)/ig;
export const tagMentionRegex = /\#\[([0-9]*)\]/;
export const noteRegex = /nostr:((note|nevent)1\w+)\b/g;
export const profileRegex = /nostr:((npub|nprofile)1\w+)\b/g;
export const profileRegex = /nostr:((npub|nprofile)1\w+)\b/;
export const editMentionRegex = /(?:\s|^)@\`(.*?)\`/ig;
export const medZapLimit = 1000;