Page MenuHomePhabricator

Remarkup block elements may not contain other block elements (like lists and tables inside tables)
Closed, WontfixPublic

Assigned To
Authored By
hach-que
Feb 14 2016, 11:40 PM
Referenced Files
None
Tokens
"Love" token, awarded by arend.danielek."Party Time" token, awarded by spawnlt."Like" token, awarded by PhoneixS.

Description

I tried writing this in Remarkup:

<table>
  <tr>
    <td>
      - abc
      - def
    </td>
  </tr>
</table>

but unexpectedly I get:

- abc
- def

Is there a way to write lists inside tables that isn't documented?

Event Timeline

epriestley triaged this task as Wishlist priority.Feb 15 2016, 3:45 PM
epriestley edited projects, added Remarkup, Feature Request; removed Bug Report.
epriestley added a subscriber: epriestley.

Currently, no block elements (lists, tables, code blocks, interpreter blocks, etc) work inside table cells. They interpret their content as inline only. So this is the expected behavior.

I believe there is no product reason we can't allow tables to contain block elements, but that supporting them is complicated.

The parser currently assumes that it can find the boundaries of a block without parsing the block. When the parser sees a <table>, it can look forward to find the next </table>, and that is always the end of the block.

This isn't exactly true, and we get cases like this arguably-wrong right now, but it's broadly close to expected behavior:

<table><tr><td>`</table>`</td></tr></table>

This will no longer be true if a table may contain other block elements (like code blocks, other tables, interpreter blocks, and literal blocks) because all of these may contain the substring </table> without closing the table. Supporting this likely requires substantial work on the parser because the way it processes blocks must change completely.

This may not be enormously complex, but I'm not aware of any situations where putting block elements inside other block elements is hugely valuable, so it is difficult to prioritize.

epriestley renamed this task from Lists don't work inside table cells to Remarkup block elements may not contain other block elements (like lists and tables inside tables).Feb 15 2016, 3:46 PM
epriestley added a subscriber: jpoehls.
epriestley claimed this task.

I don't currently plan to pursue this.