Fix npub in url getting replaced in post modal

This commit is contained in:
hzrd149 2023-07-07 10:02:39 -05:00
parent f04bc18967
commit dd4cb0bea3
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"nostrudel": patch
---
Fix npub in url getting replaced in post modal

View File

@ -1,4 +1,4 @@
export const mentionNpubOrNote = /@?((npub1|note1)[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{58})/gi;
export const mentionNpubOrNote = /(?:\s|^)(@|nostr:)?((npub1|note1)[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{58})(?:\s|$)/gi;
export const matchImageUrls =
/https?:\/\/([\dA-z\.-]+\.[A-z\.]{2,12})((?:\/[\+~%\/\.\w\-_]*)?\.(?:svg|gif|png|jpg|jpeg|webp|avif))(\??(?:[\?#\-\+=&;%@\.\w_]*)#?(?:[\-\.\!\/\\\w]*))?/i;