mirror of
https://github.com/Hopiu/python-markdown-oembed.git
synced 2026-03-16 22:10:24 +00:00
Wrap oEmbed html output in a div
To keep a constant aspect ratio for the resulting iframe of an oEmbed request in a responsive website, the iframe needs a div wrapper. With this change, html results are wrapped in a "oembed" class div.
This commit is contained in:
parent
7f12354970
commit
f3f09aae98
1 changed files with 4 additions and 2 deletions
|
|
@ -21,6 +21,8 @@ class OEmbedLinkPattern(Pattern):
|
||||||
html = self.get_oembed_html_for_match(match)
|
html = self.get_oembed_html_for_match(match)
|
||||||
if html is None:
|
if html is None:
|
||||||
return None
|
return None
|
||||||
|
else:
|
||||||
|
html = "<div class=\"oembed\">%s</div>" % html
|
||||||
placeholder = self.markdown.htmlStash.store(html, True)
|
placeholder = self.markdown.htmlStash.store(html, True)
|
||||||
return placeholder
|
return placeholder
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue