Le 2009-02-25 à 9:57, Sherwood Botsford a écrit :

        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.


One minor change. You don't need pipes in the horizontal separator lines. E.g:
       id |  name   |  description     |      more info
       ====================================================

My idea was to follow the way it currently works for tables in PHP Markdown Extra, which was made this way to make the difference clearer from the header syntax and to allow specifying text alignment for columns.
<http://michelf.com/projects/php-markdown/extra/#table>


I suspect that if you were going to write a lot of tables, you'd write
a perl program that would take an existing table that you slopped
together, and would fix the spacing of pipes on all the lines to match
the pipe spacing on the first line.

If you're going to write a Perl program for creating Markdown tables, why not create tables in HTML directly? It'd be a lot simpler to write a converter for that, and it would avoid cluttering the syntax with something you need a special program to make anyway.


--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/



_______________________________________________
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss

Reply via email to