From 1a7c62fb9369e1f375d2d09ca8a9791a9744b917 Mon Sep 17 00:00:00 2001 From: "J. Tanner Netterville" Date: Tue, 22 Jul 2014 17:12:30 -0500 Subject: [PATCH] Fixing tests, still needs work on auto protocol --- mdx_oembed/inlinepatterns.py | 2 +- tests.py | 72 ++++++++++++++++++++++++------------ 2 files changed, 49 insertions(+), 25 deletions(-) diff --git a/mdx_oembed/inlinepatterns.py b/mdx_oembed/inlinepatterns.py index 1f585d7..b147d96 100644 --- a/mdx_oembed/inlinepatterns.py +++ b/mdx_oembed/inlinepatterns.py @@ -7,7 +7,7 @@ import oembed LOG = logging.getLogger(__name__) -OEMBED_LINK_RE = r'\!\[([^\]]*)\]\((https?://[^\)]*)' \ +OEMBED_LINK_RE = r'\!\[([^\]]*)\]\(((?:https?:)?//[^\)]*)' \ r'(?' + text = '![video](http://www.youtube.com/watch?v=7XzdZ4KcI8Y)' output = self.markdown.convert(text) - self.assertEqual(output, expected) + self.assertIn('