4 ms·
Because web browsers are supposed to render HTML, not markdown. When presented with a file full of markdown, how should the browser present it? As a webpage? P
by theandrewbailey 4y ago
Because web browsers are supposed to render HTML, not markdown.
When presented with a file full of markdown, how should the browser present it? As a webpage? PDF? Plain text? Something else?
Once that format is chosen, markdown doesn't have any way to control that presentation. Black text on white? Opposite? Something else? How wide should paragraphs be? Each author and page has different preferences and requirements.
That's not considering the dozens of flavors of markdown, each with their own extensions, features, and subtle edge cases. See XKCD on standards: https://xkcd.com/927/ https://xkcd.com/927/
20 years ago, people were trying to make web pages out of XML. It didn't catch on. Markdown, likewise, has some pretty obvious pitfalls and feature deficiencies compared to HTML.
- brantonb 4y agoThe alt text on that XKCD has aged so well.
- chrisseaton 4y ago> Because web browsers are supposed to render HTML, not markdown. Ok but they could also render Markdown. > When presented with a file full of markdown, how should the browser present it? Render it on the screen. > Black text on white? Opposite? Something else? ... The browser can pick a sensible default, just like it does with HTML. How do you think GitHub manages to render Markdown? It picks a sensible default. > That's not considering the dozens of flavors of markdown Send the flavour in the MIME type. (Not sure we have MIME types for different flavours, but we could do that.)
- izietto 4y ago> Because web browsers are supposed to render HTML, not markdown. Well, they render HTML, XML, XSLT, plain text, images, videos, even PDF nowadays
- deleted 4y ago[deleted]
- yellowapple 4y agoRe: presentation and styling, Firefox's Reader Mode seems like a sensible approach.