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
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!/)