fix: support m.youtube.com subdomain links

This commit is contained in:
Alejandro Gomez 2023-01-10 15:56:06 +01:00
parent 6f3107659e
commit 781b77f735
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817

View File

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