Proposed table syntax
David McCreath
mccreath at kadmium.net
Thu Oct 21 22:14:44 EDT 2004
On Oct 21, 2004, at 3:49 PM, Lou Quillio wrote:
> It could be a rule that consecutive lines begining with pipe comprise a
> contiguous table. An optional header row might have two pipe
> characters.
FWIW, this is exactly what we did when we wrote the beginnings of a
very simple markup tool for our intranet where we're using .NET. It was
for a very specific purpose (grant summary reporting), and the tables
didn't require multiple lines; each cell was either blank or a number.
It worked very well.
The rules are two line returns followed by one or two pipes indicates
the start of a table. Two pipes generates a header row instead of
normal cells. Each subsequent pipe in the line marks another cell. Each
single return followed by a pipe indicates a new row in that table. A
pipe followed by two line returns ends the table.
The whitespace between pipes is maintained so that it can be pulled
back out of the database in its original form.
So this works as a table:
|| Head 1 | Head 2 | Head 3 |
| R1, C1 | R1, C2 | R1, C3 |
| R2, C1 | R2, C2 | R2, C3 |
We don't support with this (but have discussed) vertically-aligned
headers or multi-line cells.
David
More information about the Markdown-discuss
mailing list