Merge branch 'anantshri-patch-1'

This commit is contained in:
Tanner Netterville 2016-04-22 00:15:56 -05:00
commit 8d8dd3d21b
2 changed files with 20 additions and 1 deletions

View file

@ -6,6 +6,14 @@ YOUTUBE = oembed.OEmbedEndpoint('http://www.youtube.com/oembed', [
'https?://youtu.be/*',
])
SLIDESHARE = oembed.OEmbedEndpoint('http://www.slideshare.net/api/oembed/2', [
'http://www.slideshare.net/*/*',
'http://fr.slideshare.net/*/*',
'http://de.slideshare.net/*/*',
'http://es.slideshare.net/*/*',
'http://pt.slideshare.net/*/*',
])
FLICKR = oembed.OEmbedEndpoint('http://www.flickr.com/services/oembed/', [
'https?://*.flickr.com/*',
])
@ -17,5 +25,6 @@ VIMEO = oembed.OEmbedEndpoint('http://vimeo.com/api/oembed.json', [
DEFAULT_ENDPOINTS = [
YOUTUBE,
FLICKR,
VIMEO
VIMEO,
SLIDESHARE
]

View file

@ -150,6 +150,16 @@ class VimeoTestCase(OEmbedExtensionTestCase):
output = self.markdown.convert(text)
self.assertIn('<iframe', output)
class SlideshareTestCase(OEmbedExtensionTestCase):
def test_slideshare_link(self):
"""
Slideshare Presentation link.
"""
text = '![slides](http://www.slideshare.net/anantshri/career-in-information-security)'
output = self.markdown.convert(text)
self.assertIn('<iframe', output)
class LimitedOEmbedExtensionTestCase(OEmbedExtensionTestCase):
def setUp(self):