From e04294e0d604c019d167ff3d5aac914ea523448d Mon Sep 17 00:00:00 2001 From: Nikola Lukovic Date: Thu, 19 Oct 2023 16:33:34 +0200 Subject: [PATCH] Removed global flag when testing for profile regex. This fixes some issues when detecting profiles with nostr: prefix --- src/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants.ts b/src/constants.ts index 7c18471..b675db7 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -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;