mirror of
https://github.com/Hopiu/python-markdown-oembed.git
synced 2026-03-16 22:10:24 +00:00
Merge branch 'anantshri-patch-1'
This commit is contained in:
commit
8d8dd3d21b
2 changed files with 20 additions and 1 deletions
|
|
@ -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
|
||||
]
|
||||
|
|
|
|||
10
tests.py
10
tests.py
|
|
@ -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 = ''
|
||||
output = self.markdown.convert(text)
|
||||
self.assertIn('<iframe', output)
|
||||
|
||||
|
||||
class LimitedOEmbedExtensionTestCase(OEmbedExtensionTestCase):
|
||||
def setUp(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue