diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-01 08:44:40 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-01 08:44:40 +0000 |
commit | 6d637ad98255ab85cfc7728a0972e0b5181770a5 (patch) | |
tree | 8bb91aefa3a4a9c54f25bc91967f8693d5c83478 | |
parent | b2abe48592b3b2425d63bfbe2dc38e051bec272a (diff) | |
download | redmine-6d637ad98255ab85cfc7728a0972e0b5181770a5.tar.gz redmine-6d637ad98255ab85cfc7728a0972e0b5181770a5.zip |
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
-rw-r--r-- | lib/redmine/wiki_formatting.rb | 2 | ||||
-rw-r--r-- | test/unit/helpers/application_helper_test.rb | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/redmine/wiki_formatting.rb b/lib/redmine/wiki_formatting.rb index 79da2a38a..553f77132 100644 --- a/lib/redmine/wiki_formatting.rb +++ b/lib/redmine/wiki_formatting.rb @@ -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 diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index fa2109131..182cd3aec 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -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!/) |