From 241e4cbb681f9834ebd696a7cfb6e85586c04bea Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Fri, 16 Feb 2018 05:01:14 +0000 Subject: [PATCH] Enable lax_spacing for markdown formatting (#28119). 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 | 3 ++- .../redmine/wiki_formatting/markdown_formatter_test.rb | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/redmine/wiki_formatting/markdown/formatter.rb b/lib/redmine/wiki_formatting/markdown/formatter.rb index 82e3b6c2a..c959c3a06 100644 --- a/lib/redmine/wiki_formatting/markdown/formatter.rb +++ b/lib/redmine/wiki_formatting/markdown/formatter.rb @@ -142,7 +142,8 @@ module Redmine :strikethrough => true, :superscript => true, :no_intra_emphasis => true, - :footnotes => true + :footnotes => true, + :lax_spacing => true ) end end diff --git a/test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb index 938ee31dc..3acf29d70 100644 --- a/test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb @@ -89,5 +89,14 @@ STR assert_equal '

This is a link

', @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 "

This is a list:

\n\n", @formatter.new(text).to_html.strip + end + end end -- 2.39.5