]> source.dussan.org Git - redmine.git/commitdiff
Enable lax_spacing for markdown formatting (#28119).
authorGo MAEDA <maeda@farend.jp>
Fri, 16 Feb 2018 05:01:14 +0000 (05:01 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 16 Feb 2018 05:01:14 +0000 (05:01 +0000)
Patch by Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@17198 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/wiki_formatting/markdown/formatter.rb
test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb

index 82e3b6c2ada6f58b1017324e08adf2a598b8c939..c959c3a067d1d0f6f7f1ef7c558f9d907a536f2d 100644 (file)
@@ -142,7 +142,8 @@ module Redmine
             :strikethrough => true,
             :superscript => true,
             :no_intra_emphasis => true,
-            :footnotes => true
+            :footnotes => true,
+            :lax_spacing => true
           )
         end
       end
index 938ee31dc39ba934ce9e557b971126bf62f7661d..3acf29d70c0c0b1d899c80a4dd98a7829d0e2c07 100644 (file)
@@ -89,5 +89,14 @@ STR
     assert_equal '<p>This is a <a href="/issues">link</a></p>', @formatter.new(text).to_html.strip
   end
 
+  def test_markdown_should_not_require_surrounded_empty_line
+    text = <<-STR
+This is a list:
+* One
+* Two
+STR
+    assert_equal "<p>This is a list:</p>\n\n<ul>\n<li>One</li>\n<li>Two</li>\n</ul>", @formatter.new(text).to_html.strip
+  end
+
   end
 end