Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into exp

  • Loading branch information...
commit 94c3ac767e7a6a735a83a36e0d4f78e7ea7e8315 2 parents f2ed24e + 16ef859
@technoweenie technoweenie authored
Showing with 12 additions and 1 deletion.
  1. +1 −1  lib/gollum/markup.rb
  2. +11 −0 test/test_markup.rb
View
2  lib/gollum/markup.rb
@@ -162,7 +162,7 @@ def process_image_tag(tag)
name = parts[0].strip
path = if file = find_file(name)
::File.join @wiki.base_path, file.path
- elsif name =~ /^https?:\/\/.+(jpg|png|gif|svg|bmp)$/
+ elsif name =~ /^https?:\/\/.+(jpg|png|gif|svg|bmp)$/i
name
end
View
11 test/test_markup.rb
@@ -145,6 +145,17 @@
end
end
+ test "image with extension in caps with http url" do
+ ['http', 'https'].each do |scheme|
+ name = "Bilbo Baggins #{scheme}"
+ @wiki.write_page(name, :markdown, "a [[#{scheme}://example.com/bilbo.JPG]] b", commit_details)
+
+ page = @wiki.page(name)
+ output = page.formatted_data
+ assert_equal %{<p>a <img src="#{scheme}://example.com/bilbo.JPG" /> b</p>}, output
+ end
+ end
+
test "image with absolute path" do
@wiki = Gollum::Wiki.new(@path, :base_path => '/wiki')
index = @wiki.repo.index
Please sign in to comment.
Something went wrong with that request. Please try again.