diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-09-20 11:02:01 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-09-20 11:02:01 +0000 |
commit | 49604a3bae39e22507b5069fb4fba832c30ab032 (patch) | |
tree | 803f822538b3668aa5f49f0917ae63e0df870a03 /test | |
parent | 41011013be1a0370c301134aab21baa21f2d87e6 (diff) | |
download | redmine-49604a3bae39e22507b5069fb4fba832c30ab032.tar.gz redmine-49604a3bae39e22507b5069fb4fba832c30ab032.zip |
Table renders wrong if a trailing space is after | symbol (#18223).
Patch by Jens Krämer.
git-svn-id: http://svn.redmine.org/redmine/trunk@14611 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb | 22 |
1 files changed, 22 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 6d816537e..65a91b20a 100644 --- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb @@ -249,6 +249,28 @@ EXPECTED assert_equal expected.gsub(%r{\s+}, ''), to_html(raw).gsub(%r{\s+}, '') end + def test_table_with_trailing_whitespace + raw = <<-RAW +This is a table with trailing whitespace in one row: + +|cell11|cell12| +|cell21|cell22| +|cell31|cell32| +RAW + + expected = <<-EXPECTED +<p>This is a table with trailing whitespace in one row:</p> + +<table> + <tr><td>cell11</td><td>cell12</td></tr> + <tr><td>cell21</td><td>cell22</td></tr> + <tr><td>cell31</td><td>cell32</td></tr> +</table> +EXPECTED + + assert_equal expected.gsub(%r{\s+}, ''), to_html(raw).gsub(%r{\s+}, '') + end + def test_table_with_line_breaks raw = <<-RAW This is a table with line breaks: |