Commit 6d637ad9 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Add Redcloth's :block_markdown_rule to allow horizontal rules in wiki (#967).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1389 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent b2abe485
......@@ -26,7 +26,7 @@ module Redmine
class TextileFormatter < RedCloth
# auto_link rule after textile rules so that it doesn't break !image_url! tags
RULES = [:textile, :inline_auto_link, :inline_auto_mailto, :inline_toc, :inline_macros]
RULES = [:textile, :block_markdown_rule, :inline_auto_link, :inline_auto_mailto, :inline_toc, :inline_macros]
def initialize(*args)
super
......
......@@ -160,6 +160,11 @@ class ApplicationHelperTest < HelperTestCase
to_test.each { |text, result| assert_equal "<table>#{result}</table>", textilizable(text).gsub(/[\t\n]/, '') }
end
def test_wiki_horizontal_rule
assert_equal '<hr />', textilizable('---')
assert_equal '<p>Dashes: ---</p>', textilizable('Dashes: ---')
end
def test_macro_hello_world
text = "{{hello_world}}"
assert textilizable(text).match(/Hello world!/)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment