Comment by rkp8000
2 days ago
I love Markdown. I'm a bit surprised, though, that you still can't open a .md file by default in most web browsers. It seems like it should be quite trivial to have the browser automatically convert it to html and display it.
As I was griping above, you usually can't just view a Markdown file with formatting applied at all. I think MAYBE Notepad has been updated just recently to render it, but otherwise... you're looking at plain text with a bunch of formatting characters in it. Why? It's baffling. Where are the simple Markdown READERS?
Your plain text editor is the markdown reader. That’s the point.
It really would be nice to have a convenient renderer for it though. It's genuinely surprising something like firefox doesn't have a markdown reader builtin already.
2 replies →
Then that's no point at all. You're not seeing the formatting that the embedded formatting characters call for, so why have them in there?
and it looks like poo, that’s the other point
1 reply →
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...
The problem for web browsers is that markdown is technically a superset of HTML.
3 replies →
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.
I've taken to using Markdeep [1] for this.
You write your markdown file, but add the code snippet at the bottom of yor document and save it with a .md.html extension. Then when you double-click it it opens and renders in your browser.
I save my notes in a Google Drive, and it's now replaced all the note taking apps I've tried over the years
[1] https://casual-effects.com/markdeep/
This is a good call. I know it's been suggested multiple times over the years; I wonder what the rationale was for rejecting the format, or at least having the option to render a file when it's loaded. (Maybe a "display as HTML" button or the like would be required before it would be rendered.)
“Markdown” is a family of writing formats. There is no one “Markdown”. It’s completely unsuitable for direct inclusion in the web platform.
Related reading: https://www.rfc-editor.org/rfc/rfc7763.html text/markdown registration.
The overlap between these Markdown formats is actually larger than with many other formats. Possibly even larger than HTML’s overlap back when MS Explorer was the dominant browser.
1 reply →
Yeah, also missing a built-in JS API for turning Markdown into safe HTML. Sure, there are lots of different implementations, but maybe start with something small at least.