Project

General

Profile

Actions

Defect #14038

open

Ordered/unordered lists inside table cell are mangled

Added by Mikhail Sviridov almost 11 years ago. Updated over 1 year ago.

Status:
Reopened
Priority:
Normal
Category:
Text formatting
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Here is an example:

test name test
test formatting bold underlined striked out italic code www.redmine.org Wiki page link
test multiline bold
 
underlined
striked out
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

coffee.jpg (3.39 KB) coffee.jpg Mikhail Sviridov, 2013-05-13 12:25

Related issues

Related to Redmine - Feature #6269: RedCloth 4 supportNew

Actions
Related to Redmine - Defect #18223: Table renders wrong if a trailing space is after | symbolClosedJean-Philippe Lang

Actions
Actions #1

Updated by Mikhail Sviridov almost 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
Actions #2

Updated by Jean-Philippe Lang almost 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.

Actions #3

Updated by Mischa The Evil almost 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

Actions #4

Updated by Mikhail Sviridov almost 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.

Actions #5

Updated by Mischa The Evil almost 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.

Actions #6

Updated by Jean-Philippe Lang over 10 years ago

  • Target version changed from 2.4.0 to Candidate for next major release

2.4 feature freeze

Actions #7

Updated by Toshi MARUYAMA over 10 years ago

Actions #8

Updated by Stephan Brönnimann about 10 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
Actions #9

Updated by Toshi MARUYAMA over 9 years ago

  • Related to Defect #18223: Table renders wrong if a trailing space is after | symbol added
Actions #10

Updated by Jens Krämer over 8 years ago

I attached a patch for the trailing whitespace problem to #18223.

Actions #11

Updated by Michael Howitz over 1 year 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?

Actions

Also available in: Atom PDF