Comment by xigoi

2 days ago

That would require Markdown to be standardized. (There is the CommonMark standard, but it’s extremely complex and still ambiguous.)

You could still support a subset of the most common features like bold, italic, strike, bullets, links, etc.

Isn’t the beauty of MD supposed to be that if you can’t render it it should still look fine as plaintext?

  • Even these basics are not consistent. See my Markdown Monster:

    https://git.sr.ht/~xigoi/markdown-monster/blob/master/monste...

    • There should be only one correct interpretation of that according to CommonMark. Software is faulty for sure and a lot of the these "markdown converters" are pre-AI slop code but at least there is a carefully written spec now.

      (That dude who coined the name Markdown is being a dick about other people finishing his abandoned idea is another issue and not the fault of CommonMark.)

  • The problem for web browsers is that markdown is technically a superset of HTML.

    • I think you mean that any markdown byte sequence will also parse with some results using an HTML5 parser?

      Content-Type should fix that.

      Easy enough to associate *.md with one on most static servers too.

    • In what ways is it a superset? What can you express in markdown that can't be expressed in HTML?

    • Why is this a problem? To me it sounds like a it would be an advantage because you have everything you need to render it already built into the software.

      1 reply →

I don't think so. I think it would be sufficient to document the exact markdown it supports and let the chips fall where they may. Yes, it would push markdown in a certain direction, but that's OK as long as it stays faithful to some variant most people already know. For instance whatever variant Github or some other major, main stream tool uses. And then just ignore the critics.

It'll certainly make some people angry, but if we try to please everyone we can't get anything done. And I suspect that it is the fear of not being able to please everyone that is the reason browsers do not have markdown support. It takes a bit of courage to say "this is the variant we'll implement".

HTML was originally said to be an application of SGML. It wasn't. It was vaguely inspired by its syntax and that is the only reason HTML saw wide adoption. Had they tried to actually implement anything close to ISO 8879:1986 we would NOT have adopted HTML for the web. Mostly because it would have been too costly to implement. (Anyone doubting that: have a look at the ISO standard. You can get it in what is essentially annotated form in Charles Goldfarb's "The HTML Handbook").

Of course, Markdown is nowhere near as complex. So this is where perfect is the enemy of good and we end up getting nothing.