This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Include OEmbed provider name in embed DIVs.

  • Loading branch information...
hmans committed Mar 3, 2012
1 parent 5ab6a97 commit d6cc5366dc80517178d9bc6a88b83f593028b58b
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/schnitzelpress/markdown_renderer.rb
@@ -8,7 +8,7 @@ def block_code(code, language)
def image(link, title, alt_text)
oembed = OEmbed::Providers.get(link)
- %q(<div class="embedded %s">%s</div>) % [oembed.type, oembed.html]
+ %q(<div class="embedded %s %s">%s</div>) % [oembed.type, oembed.provider_name.parameterize, oembed.html]
rescue OEmbed::NotFound
%q(<img src="%s" title="%s" alt="%s"/>) % [link, escape_html(title), escape_html(alt_text)]
end

0 comments on commit d6cc536

Please sign in to comment.