Defect #14038
openOrdered/unordered lists inside table cell are mangled
0%
Description
Here is an example:
test name | test |
test formatting | bold underlined code www.redmine.org Wiki page link |
test multiline | bold underlined italic code Wiki page link www.redmine.org preformatted test with indents |
test numbered list | numbered list: # item 1 # item 2 |
test bulleted list | bulleted list: * item 1 * item 2 |
record after bad rows | some data |
Look at the rows with "test numbered list" and "test bulleted list" in the first column.
As I understood I can't use quotations inside of table cell as well, but it's not critical.
Files
Related issues
Updated by Mikhail Sviridov over 11 years ago
Here is modified test for lists with subitems:
test numbered list | numbered list: # item 1 # item 2 ## subitem 2.1 ## subitem 2.2 # item 3 |
test bulleted list | bulleted list: * item 1 * item 2 * subitem 2.1 * subitem 2.2 * item 3 |
Updated by Jean-Philippe Lang over 11 years ago
- Subject changed from can't use bulleted and numbered lists inside table cell to Ordered/unordered lists inside table cell are mangled
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Target version set to 2.4.0
- Resolution set to Fixed
The fact that lists are mangled in table cells is fixed in r11845. But they won't be formatted as ul/ol as Redcloth does not support this feature.
Updated by Mischa The Evil over 11 years ago
- Status changed from Closed to Reopened
The example given by Mikhail in note-1 still doesn't render properly.
|test numbered list|numbered list: # item 1 # item 2 ## subitem 2.1 ## subitem 2.2 # item 3| |test bulleted list|bulleted list: * item 1 * item 2 ** subitem 2.1 ** subitem 2.2 * item 3|
now renders as:
<table> <tr> <td>test numbered list</td> <td>numbered list:<br /># item 1<br /># item 2<br />## subitem 2.1<br />## subitem 2.2<br /># item 3</td> </tr> <tr> <td>test bulleted list</td> <td>bulleted list:<br />* item 1<br />* item 2<br /><strong>* subitem 2.1<br /></strong>* subitem 2.2<br />* item 3</td> </tr> </table>
So it looks like the nested ul
items aren't parsed correctly. I've written an additional test case based on the one in r11845 which will fail at the moment:
def test_tables_with_lists_with_nested_items
raw = <<-RAW
This is a table with lists with nested items:
|test numbered list|numbered list:
# item 1
# item 2
## subitem 2.1
## subitem 2.2
# item 3|
|test bulleted list|bulleted list:
* item 1
* item 2
** subitem 2.1
** subitem 2.2
* item 3|
RAW
expected = <<-EXPECTED
<p>This is a table with lists with nested items:</p>
<table>
<tr>
<td>test numbered list</td>
<td>numbered list:<br /># item 1<br /># item 2<br />## subitem 2.1<br />## subitem 2.2<br /># item 3</td>
</tr>
<tr>
<td>test bulleted list</td>
<td>bulleted list:<br />* item 1<br />* item 2<br />** subitem 2.1<br />** subitem 2.2<br />* item 3</td>
</tr>
</table>
EXPECTED
assert_equal expected.gsub(%r{\s+}, ''), to_html(raw).gsub(%r{\s+}, '')
end
Updated by Mikhail Sviridov over 11 years ago
Jean-Philippe Lang wrote:
But they won't be formatted as ul/ol as Redcloth does not support this feature.
I think that this fact should be subsequently reported at the Redcloth development site as feature requiest if nobody had done it earlier. It would be great to see this feature in Redmine.
Updated by Mischa The Evil over 11 years ago
Mikhail Sviridov wrote:
Jean-Philippe Lang wrote:
But they won't be formatted as ul/ol as Redcloth does not support this feature.
I think that this fact should be subsequently reported at the Redcloth development site as feature requiest if nobody had done it earlier. It would be great to see this feature in Redmine.
This relies on issue #6269. Redmine is still using (a heavily patched) RedCloth 3.0.4. All new features for RedCloth are integrated only into RedCloth 4.x.
A quick search reveals that there are already requests to format ul/ol lists inside table cells e.g. http://jgarber.lighthouseapp.com/projects/13054-redcloth/tickets/249.
Updated by Jean-Philippe Lang about 11 years ago
- Target version changed from 2.4.0 to Candidate for next major release
2.4 feature freeze
Updated by Toshi MARUYAMA about 11 years ago
- Related to Feature #6269: RedCloth 4 support added
Updated by Stephan Brönnimann almost 11 years ago
The fix has the unpleasant side-effect, that trailing space of a row leads to wrong rendering:
| 1.1 | 1.2 | | 2.1 | 2.2 | <-space here | 3.1 | 3.2 | | 4.1 | 4.2 |
renders as:
1.1 | 1.2 |
2.1 | 2.2 |
3.1 | 3.2 |
4.1 | 4.2 |
Updated by Toshi MARUYAMA about 10 years ago
- Related to Defect #18223: Table renders wrong if a trailing space is after | symbol added
Updated by Jens Krämer over 9 years ago
I attached a patch for the trailing whitespace problem to #18223.
Updated by Michael Howitz over 2 years ago
It seems that lists in tables are still not rendered as such. I there any chance to get this fixed?
BTW: Why does redmine.org use a Redmine version from 2014 for its own issue tracker?