AsciiDoc got it right: https://asciidoctor.org/docs/asciidoc-syntax-quick-reference... You can even have formatted source code in AsciiDoc table cells. Try this with Markdown ...
AsciiDoc got it right: https://asciidoctor.org/docs/asciidoc-syntax-quick-reference... You can even have formatted source code in AsciiDoc table cells. Try this with Markdown ...
h|row 1 |foo .2+|bar |baz 5+|newline +
inside cell |last cell
h|another row |bar .2+||||
...
I actually prefer reStructuredText’s approach[0], which while being a hassle to edit, at least ensures table markup visually resembles the result.Overall I feel like having to manually edit a complex table is often a sign of a flawed process somewhere, and should ideally be eliminated—author data in a structured way, and render it as a table automatically. (In the end it depends, of course.)
[0] https://docutils.sourceforge.io/docs/user/rst/quickref.html#...
can you elaborate?
Markdown tables are overly simplistic.
The real problem with markdown is that now it has now reached the kind of critical mass where people start using it everywhere and reaching for it even when it doesn't make sense simply because it's the first thing that pops into peoples head.
So, in my personal opinion, if you start needing the kind of design sugar as formatted cells then you really should be using any one of the plethora of other document formats out there because you're requirement no longer fits around the core principle of markdown. A great many of which can still be composed in a text editor and some of which are still relatively easy for a human to parse.
[edit]
Getting downvoted on this so I'll provide some citations:
> "[Markdown's] key design goal is readability – that the language be readable as-is, without looking like it has been marked up with tags or formatting instructions"
Source: https://en.wikipedia.org/wiki/Markdown#History (Wikipedia, Markdown history)
> "A Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters — including Setext, atx, Textile, reStructuredText, Grutatext, and EtText — the single biggest source of inspiration for Markdown’s syntax is the format of plain text email."
Source: https://daringfireball.net/projects/markdown/syntax (John Gruber, one of the co-creators of markdown)
> Markup offers an alternative means to encode this signaling information by overloading certain graphic characters (see, e.g., [ISO646]) with additional meanings. Therefore, markup languages allow for annotating a document in a syntactically distinguishable way from the text, while keeping the annotations printable.
Source: https://tools.ietf.org/html/rfc7763 (original RFC)
From that point of view, tables should have never been part of Markdown.
It seems like the OP would be better served by CommonMark or any of the alternate implementations which are designed to be more feature complete to solve these kinds of formatting problems.
Regardless, if you want to go down the rat hole of exactly what is Markdown, the only "correct" answer is 'whatever Gruber's 'markdown.pl' does, warts and all'.
That's what usually happens here on HN when you say "this is wrong" to the crowd doing that wrong thing.
Markdown has clearly been extended beyond its original intention, so the criticism on its inadequacy for tables is justified in that it is the de facto standard across platforms and folks are struggling with it.
Whatever its original design goal was is sort of besides the point now. People dislike having to type complex tables manually and not using Markdown isn't a choice in a variety of situations. That frustration is justified.