Hi all! Community Commonmark!
I would like to help with the table syntax, I would like to include this table syntax:
table syntax - my initial proposal, my idea
{
header1, header2, header3, header4 ...
} {
value1 header1, value 2 header1 ...
value1 header2, value 2 header2 ...
value1 header3, value 2 header3 ...
value1 header4, value 2 header4 ...
}
Problems that the syntax seeks to solve
- CSV tables for markdown
- This table syntax is similar to the MediaWiki table syntax with a few changes:
mediawiki
{|
! Header !! Another header
|-
| field 1 || something
|-
| field 2
| something else
|}
Pros or advantages of this syntax
- Most people know csv and css files
- no indentation required
- If you have a lot of data would you would have a lot of rows and columns data, to make this easier the syntax tries to solve this by adding {} for header and data body
- looks a bit like csv
- If you have a lot of data it would be interesting to use this syntax to add this in a few descriptions.
- It’s easy to maintain
- It’s easy to manage
- Header data is separate from body data
- It’s easy to control this table data
- Anyone who is a web developer is used to css, a syntax I describe here is similar to something from css
- You don’t need to have additional knowledge, it’s easy as it looks like csv and css
Cons
- would like to know what you guys think
- may be ugly syntax for many, it’s an alternative to table pattern in markdown
other idea 1
{|
header1, header2, header3, header4 ...
|} {|
value1 header1, value 2 header1 ...
value1 header2, value 2 header2 ...
value1 header3, value 2 header3 ...
value1 header4, value 2 header4 ...
|}
other idea 2
|
header1, header2, header3, header4 ...
| |
value1 header1, value 2 header1 ...
value1 header2, value 2 header2 ...
value1 header3, value 2 header3 ...
value1 header4, value 2 header4 ...
|
other idea 3
[header, header1, header2]
header1: [data1 header 1, data2 header1, data3 header1]
header2: [data1 header 2, data2 header2, data3 header2]
header3: [data1 header 3, data2 header3, data3 header3]
other idea 3.1
[header, header1, header2]
[data, data, data, data, data ...]
pros - idea 1, 2, 3 or idea 3.1
- looks like r language syntax
- everything is array
- line->column
other idea 5
pros - idea 5
- turn csv into valid markdown table
notes
- I added complementary ideas
- I read this post: https://talk.commonmark.org/t/tables-in-pure-markdown and got the idea