On simplifying table syntax in any future markdown extension. (Use CSV)

mofo syne mofosyne at gmail.com
Fri Sep 5 23:50:05 EDT 2014


I see, well hopefully more implementation will support at least:

        | header | header | header
        | ------------------------
        | cell | cell | cell

Still how difficult would it be to just have:

        header | header | header
        ------------------------
        cell | cell | cell
        cell | cell | cell

as the basic 'base pipe table'? Since it's the lowest common
denominator of table writing that is still easy to visually parse that
I can think of.

The reason I think it could be possible is that pandoc already does this:

      Right     Left     Center     Default
    -------     ------ ----------   -------
         12     12        12            12
        123     123       123          123
          1     1          1             1

    Table:  Demonstration of simple table syntax.

simple table src: http://johnmacfarlane.net/pandoc/README.html

Which in itself already requires "context" to recognise it as a table
(It however it lacks even a `|` character. Which I think should be
discouraged)

On Sat, Sep 6, 2014 at 4:11 AM, Michel Fortin <michel.fortin at michelf.ca> wrote:
> Le 5-sept.-2014 à 13:34, mofo syne <mofosyne at gmail.com> a écrit :
>
>> I see. So it's a bit too idealistic in terms of the practicality of implementing csv inspired tables.
>>
>> How's Tom other second and third examples? Both uses pipes and I preferred the second version. However the --------- is mistaken for a h1 header according to babelmark. Second examples of a single |-----| means only the first row of the cell data is displayed or pandoc.
>>
>> I'm guessing the biggest issue about implementing with "------" is that parsing such tables require processing the context.
>
> Actually, if you start with a pipe character on each line, you don't need to add more pipes on the separator line with Markdown Extra. Tom's last suggestion already works, and so does this one:
>
>         | header | header | header
>         | ------------------------
>         | cell | cell | cell
>
> Well, for PHP Markdown Extra and a couple more at least.
>
> http://johnmacfarlane.net/babelmark2/?normalize=1&text=%7C+header+%7C+header+%7C+header%0A%7C+------------------------%0A%7C+cell+%7C+cell+%7C+cell
>
> --
> Michel Fortin
> michel.fortin at michelf.ca
> http://michelf.ca
>
> _______________________________________________
> Markdown-Discuss mailing list
> Markdown-Discuss at six.pairlist.net
> http://six.pairlist.net/mailman/listinfo/markdown-discuss


More information about the Markdown-Discuss mailing list