diff --git a/lib/url.js b/lib/url.js index bd11697f..0322c72c 100644 --- a/lib/url.js +++ b/lib/url.js @@ -93,7 +93,7 @@ export function parseEmbedUrl (href) { const { hostname, pathname, searchParams } = new URL(href) // nostr prefixes: [npub1, nevent1, nprofile1, note1] - const nostr = href.match(/(?(?npub1|nevent1|nprofile1|note1|naddr1)[02-9ac-hj-np-z]+)/) + const nostr = href.match(/\/(?(?npub1|nevent1|nprofile1|note1|naddr1)[02-9ac-hj-np-z]+)/) if (nostr?.groups?.id) { let id = nostr.groups.id if (nostr.groups.type === 'npub1') {