mirror of
https://github.com/aljazceru/njump.git
synced 2026-01-31 11:44:34 +01:00
Avoid false positive in rendering of mentions
This commit is contained in:
2
utils.go
2
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(`(?:^|<br/>|\s)nostr:((note|nevent|naddr)1[a-z0-9]+)\b(?:\s|<br/>|$)`)
|
||||
nostrNpubNprofileMatcher = regexp.MustCompile(`nostr:((npub|nprofile)1[a-z0-9]+)\b`)
|
||||
|
||||
urlMatcher = func() *regexp.Regexp {
|
||||
|
||||
Reference in New Issue
Block a user