summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-03-31 05:31:54 +0000
committerGo MAEDA <maeda@farend.jp>2018-03-31 05:31:54 +0000
commitb0b271283d02bf0c878433dac5c90cbba7ee5ed6 (patch)
tree12226c247dc7471213960b0e32c85dbd46743a45
parent16a60ebc2c18e43ceac267244fc2814ad84c420c (diff)
downloadredmine-b0b271283d02bf0c878433dac5c90cbba7ee5ed6.tar.gz
redmine-b0b271283d02bf0c878433dac5c90cbba7ee5ed6.zip
Merged r17198 to 3.3-stable (#28119).
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@17248 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/redmine/wiki_formatting/markdown/formatter.rb3
-rw-r--r--test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb9
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/redmine/wiki_formatting/markdown/formatter.rb b/lib/redmine/wiki_formatting/markdown/formatter.rb
index bfb04774c..2721adf3d 100644
--- a/lib/redmine/wiki_formatting/markdown/formatter.rb
+++ b/lib/redmine/wiki_formatting/markdown/formatter.rb
@@ -138,7 +138,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 77dd93c7d..5ad67f431 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 '<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