fix url regex
This commit is contained in:
@ -303,7 +303,7 @@ export function groupByPubkey(acc: Record<HexKey, MetadataCache>, user: Metadata
|
|||||||
|
|
||||||
export function splitByUrl(str: string) {
|
export function splitByUrl(str: string) {
|
||||||
const urlRegex =
|
const urlRegex =
|
||||||
/((?:http|ftp|https|nostr|web\+nostr|magnet):\/?\/?(?:[\w+?.\w+])+(?:[a-zA-Z0-9~!@#$%^&*()_\-=+\\/?.:;',]*)?(?:[-A-Za-z0-9+&@#/%=~_|]))/i;
|
/((?:http|ftp|https|nostr|web\+nostr|magnet):\/?\/?(?:[\w+?.\w+])+(?:[a-zA-Z0-9~!@#$%^&*()_\-=+\\/?.:;',]*)?(?:[-A-Za-z0-9+&@#/%=~()_|]))/i;
|
||||||
|
|
||||||
return str.split(urlRegex);
|
return str.split(urlRegex);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user