wrapped cell contents in tables

Benoit Perdu - TransMékong benoit at transmekong.com
Thu Feb 26 08:37:26 EST 2009

> If you want multiple lines per cell, I'd suggest using a more explicit

> grid, something like this:


> id | name | description | more info

> ====|=========|==================|=====================

> 6 | Inset | An inset element | just one element

> ----|---------|------------------|---------------------

> 8 | Stories | Another element | another element

> | | | with 2 lines

> ----|---------|------------------|---------------------

> 9 | Other | Another element | another element

> | | | with 2 lines

> ----|---------|------------------|---------------------

> 5 | Illust. | An illustration | line breaks are not

> | | andn I think you | possible in a table

> | | know what I mena.|


> This is totally unambiguous and easy to scan for the reader. The

> problem is that, even though it's easy to read, it's also more tedious

> to write.


Reading you a second time, I agree that this would make it more legible.
And writing this just entails inserting lines of dashes and pipes,
typically of the same pattern as above, so IMO just cut and paste would
do the trick. (or, even faster, Ctrl-K - Ctrl-U for the pico users)

The one difficulty is that this is incompatible with the present syntax
for tables in PHP Markdown Extra.

A workaround could be to:

* Keep the present syntax valid,that is where the head of the columns
are separated from the data by a line of dashes and pipes

* Allow for an alternative table syntax as per your scheme here-above,
where the head cells are separated by a line of equal signs (=) and
pipes, then where any line composed of dashes (-) and pipes (|) means we
jump to next row.

David's syntax could even be offered as an alternative within each
scheme --though on second sight colons inside the text of a cell might
make it very tricky to parse correctly.


More information about the Markdown-Discuss mailing list