Skip to content
This repository has been archived by the owner on Mar 20, 2018. It is now read-only.

Commit

Permalink
Include OEmbed provider name in embed DIVs.
Browse files Browse the repository at this point in the history
  • Loading branch information
hmans committed Mar 3, 2012
1 parent 5ab6a97 commit d6cc536
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/schnitzelpress/markdown_renderer.rb
Expand Up @@ -8,7 +8,7 @@ def block_code(code, language)


def image(link, title, alt_text) def image(link, title, alt_text)
oembed = OEmbed::Providers.get(link) 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 rescue OEmbed::NotFound
%q(<img src="%s" title="%s" alt="%s"/>) % [link, escape_html(title), escape_html(alt_text)] %q(<img src="%s" title="%s" alt="%s"/>) % [link, escape_html(title), escape_html(alt_text)]
end end
Expand Down

0 comments on commit d6cc536

Please sign in to comment.