News for hackers. Stuff that matters.
Re:Show HN: Excel-like table editing for Markdown by cryptos on Tuesday March 24, 2020 @04:28AM (#22673057)
Although it looks nice, tables and Markdown are not a good fit. The syntax for tables in Markdown is broken by design!

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 ...

Re:Show HN: Excel-like table editing for Markdown by goblin89 on Tuesday March 24, 2020 @04:58AM (#22673169)
I find complex tables frustrating to read and write in AsciiDoc. The markup can be written in a way that visually does not resemble the resulting table at all; newlines within cells (apparently) require actual newlines breaking “one row per line of markup” intuitive mapping; syntax errors or mismatched col/rowspans are difficult to spot; and so on.

    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#...

Re:Show HN: Excel-like table editing for Markdown by ssb1 on Tuesday March 24, 2020 @10:24AM (#22674918)
ReStructuredText also has list tables. And CSV tables. https://sublime-and-sphinx-guide.readthedocs.io/en/latest/ta...
Re:Show HN: Excel-like table editing for Markdown by jamesrcole on Tuesday March 24, 2020 @04:30AM (#22673068)
> The syntax for tables in Markdown is broken by design!

can you elaborate?

Re:Show HN: Excel-like table editing for Markdown by cryptos on Tuesday March 24, 2020 @04:42AM (#22673105)
The syntax simulates the visual representation of tables, but that doesn't scale for larger tables with many columns and/or large columns with a lot of content. Another downside is that you can not use markup, like bullet lists or source code formatting, in table cells.

Markdown tables are overly simplistic.

Re:Show HN: Excel-like table editing for Markdown by laumars on Tuesday March 24, 2020 @05:01AM (#22673176)
That's because the point of markdown is to be an overly simplistic styling convention that reads just as cleanly in clear text (eg on the terminal) as it does in formatted renderers. Tables weren't even part of the original design of markdown. In fact there's a lot of stuff that Github and others have bolted onto markdown.

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)

Re:Show HN: Excel-like table editing for Markdown by cryptos on Tuesday March 24, 2020 @05:20AM (#22673250)
I totally agree with you. Markdown is nice as a pretty simple documentation format. It is a good fit for something like a letter, a README or a short tutorial. I you go beyond this level, you are better off with something more powerful like AsciiDoc.

From that point of view, tables should have never been part of Markdown.

Re:Show HN: Excel-like table editing for Markdown by tannhaeuser on Tuesday March 24, 2020 @06:03AM (#22673429)
Nit: tables are part of github-flavored markdown, not John Gruber's original Markdown.PL, and there's also another table extension syntax for markdown. Apart from that, the point of markdown is that you can drop to plain inline HTML/markup or markup blocks when markdown short syntax is insufficient, such as for complex table layouts. Regular markdown syntax really is made for plain text editing. As such, it would probably make more sense that a visual editor, cool as it looks, targets robust markup serialization (HTML-in-markdown) rather than producing markup shortform syntax IMO (but then again, the plethora of markdown editors may prove me wrong on this one).
Re:Show HN: Excel-like table editing for Markdown by chrisfinazzo on Tuesday March 24, 2020 @11:52AM (#22675596)
This.

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'.

Re:Show HN: Excel-like table editing for Markdown by airstrike on Tuesday March 24, 2020 @10:44AM (#22675039)
I don't think you're getting downvoted due a lack of sources.

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.

Re:Show HN: Excel-like table editing for Markdown by ppod on Tuesday March 24, 2020 @09:04AM (#22674489)
I really agree with you so not asking in a snarky way, but which other document formats do you have in mind? Something like HTML?
Re:Show HN: Excel-like table editing for Markdown by auxym on Tuesday March 24, 2020 @09:36AM (#22674678)
AsciiDoc, Rst, Org mode, Latex come to mind
Re:Show HN: Excel-like table editing for Markdown by cryptos on Tuesday March 24, 2020 @11:26AM (#22675366)
But tables in LaTeX are not fun, too. Once upon time I was about to write a bunch of big and complex tables with LaTeX and needed to include "mini pages" in table cells to be able to render complex content. It was so awkward that I stopped using LaTeX.
Re:Show HN: Excel-like table editing for Markdown by chinesempire on Tuesday March 24, 2020 @05:59AM (#22673409)
> Getting downvoted on this so I'll provide some citations

That's what usually happens here on HN when you say "this is wrong" to the crowd doing that wrong thing.