So it’s probably better if the proposed syntax does not rely on column alignment.
Agreed. Would it be a bad idea if the spec supported both means of determining column span? e.g,
| aaa | bbb |
| ccc ||
would be equivalent to
| aaa | bbb |
| ccc |
Instead of using periods, it would look better to use hyphens
But only marginally better I think:
| heading | heading 2 |
| | sub head a | sub head b |
|---------|----------------------|--------------|
| aaa | this is still just | ccc |
| | a single row but I | |
| | talk too much | |
|.........|......................|..............|
| aaa | bbb | ccc |
|.........|......................|..............|
| this spans two rows and two | ccc |
| columns |..............|
| | ccc |
|.........|:....................:|..............|
| aaa | centered | ccc |
|.........|......................|..............|
| aaa | - item one | ccc |
| | - item two | |
| heading | heading 2 |
| | sub head a | sub head b |
|=========|======================|==============|
| aaa | this is still just | ccc |
| | a single row but I | |
| | talk too much | |
|---------|----------------------|--------------|
| aaa | bbb | ccc |
|---------|----------------------|--------------|
| this spans two rows and two | ccc |
| columns |--------------|
| | ccc |
|---------|:--------------------:|--------------|
| aaa | centered | ccc |
|---------|----------------------|--------------|
| aaa | - item one | ccc |
| | - item two | |
Options:
-
for headers,.
for rows, because GFM backwards compatibility is worth more=
for headers,-
for rows, because it’s more readable.#
or+
can be used to mark row headers.- support both, with the occurrence of a
=
delimiter row changing the meaning of a-
delimiter row.
Option 3 might be too complex for users. Not so much worried about parsers.
Also I think @chrisalley might be right above when he says cell alignment is a presentation thing, in which case I’d remove the column alignment stuff from my proposal. It would certainly simplify it.