Page MenuHomePhabricator

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

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

dtf added a subscriber: dtf.Feb 15 2016, 11:19 AM
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.
chad moved this task from Backlog to Parser on the Remarkup board.Mar 27 2017, 3:56 PM
chad moved this task from Parser to Tables on the Remarkup board.Mar 27 2017, 4:00 PM
spawnlt added a subscriber: spawnlt.
epriestley closed this task as Wontfix.Apr 4 2018, 2:07 PM
epriestley claimed this task.

I don't currently plan to pursue this.