Sha256: 8f3efa864e7184b09f0a576baa21eb99322603e9314d66fe4a59430125cb75fc
Contents?: true
Size: 156 Bytes
Versions: 3
Compression:
Stored size: 156 Bytes
Contents
AutoHtml.add_filter(:image) do |text| text.gsub(/https?:\/\/.+\.(jpg|jpeg|bmp|gif|png)(\?\S+)?/i) do |match| %|<img src="#{match}" alt=""/>| end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
auto_html-1.3.7 | lib/auto_html/filters/image.rb |
auto_html-1.3.6 | lib/auto_html/filters/image.rb |
auto_html-1.3.5 | lib/auto_html/filters/image.rb |