From 67eebfbf2944553f6b9a0c2284be0a5946631eb3 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Wed, 2 Dec 2015 15:04:04 -0800 Subject: [PATCH] Fix embedding of /embed/ and /v/ (old embed) Youtube links; clean up regexp. --- src/Linkification/Embedding.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Linkification/Embedding.coffee b/src/Linkification/Embedding.coffee index cd383f4e8..3f0aeea6e 100644 --- a/src/Linkification/Embedding.coffee +++ b/src/Linkification/Embedding.coffee @@ -295,7 +295,7 @@ Embedding = src: "https://vine.co/v/#{a.dataset.uid}/card" , key: 'YouTube' - regExp: /^\w+:\/\/(?:youtu.be\/|[\w\.]*youtube[\w\.]*\/.*(?:v=|\/embed\/|\/v\/|\/videos\/))([\w\-]{11})[^#\&\?]?(.*)/ + regExp: /^\w+:\/\/(?:youtu.be\/|[\w.]*youtube[\w.]*\/.*(?:v=|\bembed\/|\bv\/))([\w\-]{11})(.*)/ el: (a) -> start = a.dataset.options.match /\b(?:star)?t\=(\w+)/ start = start[1] if start