From 93b9748ca46612391d8a47bb24134a8f4e631a86 Mon Sep 17 00:00:00 2001 From: dtonon Date: Thu, 13 Jun 2024 23:24:53 +0200 Subject: [PATCH] Avoid false positive in rendering of mentions --- utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.go b/utils.go index d755bba..34307ee 100644 --- a/utils.go +++ b/utils.go @@ -27,7 +27,7 @@ const ( var ( urlSuffixMatcher = regexp.MustCompile(`[\w-_.]+\.[\w-_.]+(\/[\/\w]*)?$`) nostrEveryMatcher = regexp.MustCompile(`nostr:((npub|note|nevent|nprofile|naddr)1[a-z0-9]+)\b`) - nostrNoteNeventMatcher = regexp.MustCompile(`nostr:((note|nevent|naddr)1[a-z0-9]+)\b`) + nostrNoteNeventMatcher = regexp.MustCompile(`(?:^|
|\s)nostr:((note|nevent|naddr)1[a-z0-9]+)\b(?:\s|
|$)`) nostrNpubNprofileMatcher = regexp.MustCompile(`nostr:((npub|nprofile)1[a-z0-9]+)\b`) urlMatcher = func() *regexp.Regexp {