Merge pull request #366 from sevonj/feat-m-yt-links

feat: Recognize m.youtube.com links
This commit is contained in:
Xylight authored and GitHub committed 2024-07-23 10:24:28 -07:00
commit 9758f4c829
1 file changed
+1 -1
+1 -1
View File
@@ -56,7 +56,7 @@ export const optimizeImageURL = (
}
const YOUTUBE_REGEX =
/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|shorts\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/
/^(?:https?:\/\/)?(?:www\.|m\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|shorts\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/
export const isYoutubeLink = (url?: string): RegExpMatchArray | null => {
if (!url) return null