]> source.dussan.org Git - redmine.git/commitdiff
Add Redcloth's :block_markdown_rule to allow horizontal rules in wiki (#967).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 1 May 2008 08:44:40 +0000 (08:44 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 1 May 2008 08:44:40 +0000 (08:44 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1389 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/wiki_formatting.rb
test/unit/helpers/application_helper_test.rb

index 79da2a38a5bbdef07a745f2e804044eef7023112..553f771322bea51f83f6b24013702859bcd55b72 100644 (file)
@@ -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
index fa2109131cc80104ed8e61352c1763090580c758..182cd3aec57cd7f11db8095f23a1c6b3604d7f6e 100644 (file)
@@ -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!/)