class Jekyll::Embed::Content
Constants
- URL_RE
Public Class Methods
embed!(content)
click to toggle source
Find URLs on paragraphs. We do it after rendering because sometimes we use HTML instead of pure Markdown and this way we catch both.
# File lib/jekyll/embed/content.rb 14 def embed!(content) 15 URL_RE.match(content) do |match| 16 embed = Jekyll::Embed.embed CGI.unescapeHTML(match[:url]) 17 18 content.sub! URL_RE, embed 19 end 20 end