fix: support shorts YouTube URLs

This commit is contained in:
Alejandro Gomez 2023-01-11 19:26:37 +01:00
parent 425a21b095
commit dd8e884f68
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817

View File

@ -61,7 +61,7 @@ export const InvoiceRegex = /(lnbc\w+)/i;
/** /**
* YouTube URL regex * YouTube URL regex
*/ */
export const YoutubeUrlRegex = /(?:https?:\/\/)?(?:www|m\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})/; export const YoutubeUrlRegex = /(?:https?:\/\/)?(?:www|m\.)?(?:youtu\.be\/|youtube\.com\/(?:shorts\/|embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})/;
/** /**
* Hashtag regex * Hashtag regex