Method: HTML::Pipeline::ImageFilter#call
- Defined in:
- lib/html/pipeline/image_filter.rb
#call ⇒ Object
10 11 12 13 14 |
# File 'lib/html/pipeline/image_filter.rb', line 10 def call @text.gsub(/(https|http)?:\/\/.+\.(jpg|jpeg|bmp|gif|png)(\?\S+)?/i) do |match| %(<img src="#{match}" alt=""/>) end end |