Sha256: 81ec95ddaa79b8d1893b81537f80ad67577bc19c3ffae2011ee6f2bf6bc40791
Contents?: true
Size: 320 Bytes
Versions: 1
Compression:
Stored size: 320 Bytes
Contents
require 'uri' require 'net/http' AutoHtml.add_filter(:instagram) do |text| regex = %r{https?:\/\/(www.)?instagr(am\.com|\.am)/p/.+} text.gsub(regex) do |match| match << '/' unless match.end_with?('/') %{<iframe src="#{match}embed" height="714" width="616" frameborder="0" scrolling="no"></iframe>} end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
auto_html-whistlerbrk-2.0.0.pre | lib/auto_html/filters/instagram.rb |