embeds
Advanced tools
Comparing version 2.8.1 to 2.9.0
@@ -47,2 +47,10 @@ 'use strict'; | ||
}; | ||
}], [/(https?:)?\/\/(www\.)?giphy\.com\/gifs\/(?:.*-)?([^ \/]+)/, function (match) { | ||
var id = match[3]; | ||
return { | ||
type: 'giphy', | ||
text: '', | ||
url: 'https://giphy.com/embed/' + id, | ||
id: id | ||
}; | ||
}], [/(https?:)?\/\/(www\.)?facebook\.com\/([\w.-]+)\/(videos|posts)\/([0-9]+)/, function (match) { | ||
@@ -49,0 +57,0 @@ var user = match[3]; |
@@ -20,2 +20,11 @@ const allowed = [ | ||
}], | ||
[/(https?:)?\/\/(www\.)?giphy\.com\/gifs\/(?:.*-)?([^ \/]+)/, match => { | ||
const id = match[3]; | ||
return { | ||
type: 'giphy', | ||
text: '', | ||
url: `https://giphy.com/embed/${id}`, | ||
id: id | ||
}; | ||
}], | ||
[/(https?:)?\/\/(www\.)?facebook\.com\/([\w.-]+)\/(videos|posts)\/([0-9]+)/, match => { | ||
@@ -22,0 +31,0 @@ const user = match[3]; |
{ | ||
"name": "embeds", | ||
"version": "2.8.1", | ||
"version": "2.9.0", | ||
"description": "Parse & render embeds", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -57,2 +57,6 @@ import test from './tape-wrapper'; | ||
t.deepEqual(parseInput('//giphy.com/embed/3oxRmeLK7bjcq0CCCA'), expected); | ||
t.deepEqual(parseInput('https://giphy.com/gifs/new-girl-fox-new-girl-newgirl-3oxRmeLK7bjcq0CCCA'), expected); | ||
t.deepEqual(parseInput('https://giphy.com/gifs/new-girl-fox-new-girl-newgirl-3oxRmeLK7bjcq0CCCA/'), expected); | ||
t.deepEqual(parseInput('http://giphy.com/gifs/new-girl-fox-new-girl-newgirl-3oxRmeLK7bjcq0CCCA'), expected); | ||
t.deepEqual(parseInput('//giphy.com/gifs/new-girl-fox-new-girl-newgirl-3oxRmeLK7bjcq0CCCA'), expected); | ||
t.deepEqual(parseInput(code), expected); | ||
@@ -59,0 +63,0 @@ }); |
131059
3182