From dd30a7bdc2e59d64063930a154536ec658ec43c5 Mon Sep 17 00:00:00 2001 From: rick Date: Mon, 16 Aug 2010 15:49:47 -0700 Subject: [PATCH] fix markup on framed absolute image urls --- lib/gollum/markup.rb | 2 +- test/test_markup.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/gollum/markup.rb b/lib/gollum/markup.rb index 6359c528..6e5000cc 100644 --- a/lib/gollum/markup.rb +++ b/lib/gollum/markup.rb @@ -200,7 +200,7 @@ module Gollum classes << 'frame' if opts['frame'] %{} + %{} + - %{} + + %{} + (alt ? %{#{alt}} : '') + %{} + %{} diff --git a/test/test_markup.rb b/test/test_markup.rb index 184d270e..8b3b4579 100644 --- a/test/test_markup.rb +++ b/test/test_markup.rb @@ -205,6 +205,12 @@ context "Markup" do relative_image(content, output) end + test "absolute image with frame" do + content = "a\n\n[[http://example.com/bilbo.jpg|frame]]\n\nb" + output = "

a

\n\n

\n\n

b

" + relative_image(content, output) + end + test "image with frame and alt" do content = "a\n\n[[alpha.jpg|frame|alt=Alpha]]\n\nb" output = "

a

\n\n

\"Alpha\"Alpha

\n\n

b

"