##// END OF EJS Templates
Add Redcloth's :block_markdown_rule to allow horizontal rules in wiki (#967)....
Jean-Philippe Lang -
r1374:6d637ad98255
parent child
Show More
@@ -26,7 +26,7 module Redmine
26 class TextileFormatter < RedCloth
26 class TextileFormatter < RedCloth
27
27
28 # auto_link rule after textile rules so that it doesn't break !image_url! tags
28 # auto_link rule after textile rules so that it doesn't break !image_url! tags
29 RULES = [:textile, :inline_auto_link, :inline_auto_mailto, :inline_toc, :inline_macros]
29 RULES = [:textile, :block_markdown_rule, :inline_auto_link, :inline_auto_mailto, :inline_toc, :inline_macros]
30
30
31 def initialize(*args)
31 def initialize(*args)
32 super
32 super
@@ -160,6 +160,11 class ApplicationHelperTest < HelperTestCase
160 to_test.each { |text, result| assert_equal "<table>#{result}</table>", textilizable(text).gsub(/[\t\n]/, '') }
160 to_test.each { |text, result| assert_equal "<table>#{result}</table>", textilizable(text).gsub(/[\t\n]/, '') }
161 end
161 end
162
162
163 def test_wiki_horizontal_rule
164 assert_equal '<hr />', textilizable('---')
165 assert_equal '<p>Dashes: ---</p>', textilizable('Dashes: ---')
166 end
167
163 def test_macro_hello_world
168 def test_macro_hello_world
164 text = "{{hello_world}}"
169 text = "{{hello_world}}"
165 assert textilizable(text).match(/Hello world!/)
170 assert textilizable(text).match(/Hello world!/)
General Comments 0
You need to be logged in to leave comments. Login now