Designing table definition syntax for Markdown

I have not hidden my contempt for BBCode and support more readable text-to-HTML converters such as Markdown, which is SO . The "Canonical" Markdown , however, does not have a syntax for defining tables. So, I'm trying to come up with an extension that does just that.

First of all, it should be easy to read and write. Of course, this should also not contradict the existing Markdown syntax. PHP Markdown has syntax for tables that look like this:

| First Header | Second Header | | ------------- | ------------- | | Content Cell | Content Cell | | Content Cell | Content Cell | 

For some reason this seems to me "not enough" (mainly because it looks too verbose). Does anyone know of a Markdown dialect with stronger syntax? You can also write your own.

Bonus points, if not extremely difficult to make out, but still flexible enough to handle alignments (horizontal and vertical), table headers, and possibly colspan and rowspan .

+4
source share
1 answer

I like the syntax of the table for text . It looks like this:

 |_. a header cell |_. another header | |_. one more header |=. centered cell | | regular cell |>. right-aligned cell | 

The parser does not care about spaces. This syntax is flexible and avoids the harshness of syntaxes (like yours, Reddit, etc.) requiring a โ€œdividingโ€ line between one header line and the rest of the table.

+3
source

All Articles