diff options
author | Go MAEDA <maeda@farend.jp> | 2018-11-26 04:40:09 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-11-26 04:40:09 +0000 |
commit | 7fbcb8c908ae23dbf40c02a71c1f7abe78e3f5cb (patch) | |
tree | 019f518c91b86eab21111a1b90e64d96a11fb840 /test/unit/lib | |
parent | 6a12b5839bf4f4ebceef398e167737ca0cca3c80 (diff) | |
download | redmine-7fbcb8c908ae23dbf40c02a71c1f7abe78e3f5cb.tar.gz redmine-7fbcb8c908ae23dbf40c02a71c1f7abe78e3f5cb.zip |
Tags start with 'pre' are handled as 'pre' tag in Textile (#8395).
Patch by Takenori TAKAKI and Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@17636 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/lib')
-rw-r--r-- | test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb index a4c8167d1..4bbef9996 100644 --- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb @@ -605,6 +605,22 @@ EXPECTED assert_nothing_raised { to_html(" \v") } end + def test_should_not_handle_as_preformatted_text_tags_that_starts_with_pre + text = <<-STR +<pree> + This is some text +</pree> +STR + + expected = <<-EXPECTED +<p><pree><br /> + This is some text<br /> +</pree></p> +EXPECTED + + assert_equal expected.gsub(%r{[\r\n\t]}, ''), to_html(text).gsub(%r{[\r\n\t]}, '') + end + private def assert_html_output(to_test, expect_paragraph = true) |