Permalink
Browse files

bug fix for adding multiple images

  • Loading branch information...
1 parent 22e6d2a commit cdeaf0181bbd124e6db5a7eea9b11fa3d0083c61 ahmedmostafa committed Feb 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/auto_html/filters/image.rb
@@ -9,7 +9,7 @@ def paragraph(text)
AutoHtml.add_filter(:image).with({:alt => ''}) do |text, options|
r = Redcarpet::Markdown.new(NoParagraphRenderer)
alt = options[:alt]
- text.gsub(/https?:\/\/.+\.(jpg|jpeg|bmp|gif|png)(\?\S+)?/i) do |match|
+ text.gsub(/https?:\/\/.+?\.(jpg|jpeg|bmp|gif|png)(\?\S+)?/i) do |match|
r.render("![#{alt}](#{match})")
end
end

0 comments on commit cdeaf01

Please sign in to comment.