diff --git a/mdx_oembed/inlinepatterns.py b/mdx_oembed/inlinepatterns.py index 9f71fd3..1fbb09d 100644 --- a/mdx_oembed/inlinepatterns.py +++ b/mdx_oembed/inlinepatterns.py @@ -21,8 +21,10 @@ class OEmbedLinkPattern(Pattern): html = self.get_oembed_html_for_match(match) if html is None: return None - placeholder = self.markdown.htmlStash.store(html, True) - return placeholder + else: + html = "
" % html + placeholder = self.markdown.htmlStash.store(html, True) + return placeholder def get_oembed_html_for_match(self, match): url = match.group(3).strip()