From 464a6d1f073c92040f862f4011aab777da7f2153 Mon Sep 17 00:00:00 2001 From: Gregor Schmidt Date: Wed, 25 May 2016 13:14:23 +0200 Subject: [PATCH] Fix HTML generated for floating images in paragraphs #22898 --- lib/redcloth3.rb | 2 +- test/unit/helpers/application_helper_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb index f9c9054..99f989b 100644 --- a/lib/redcloth3.rb +++ b/lib/redcloth3.rb @@ -970,7 +970,7 @@ class RedCloth3 < String if stln == "

" out = "

#{ out }" else - out = "#{ stln }

#{ out }
" + out = "#{ stln }#{ out }" end else out = stln + out diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index d2b1955..298a6f8 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -116,7 +116,7 @@ class ApplicationHelperTest < ActionView::TestCase def test_inline_images to_test = { '!http://foo.bar/image.jpg!' => '', - 'floating !>http://foo.bar/image.jpg!' => 'floating
', + 'floating !>http://foo.bar/image.jpg!' => 'floating ', 'with class !(some-class)http://foo.bar/image.jpg!' => 'with class ', 'with style !{width:100px;height:100px}http://foo.bar/image.jpg!' => 'with style ', 'with title !http://foo.bar/image.jpg(This is a title)!' => 'with title This is a title', -- 2.8.0