Hacker News new | ask | show | jobs
by walterbell 2818 days ago
Why can't web browsers render basic markdown natively (no plugins)? Wouldn't that be a much simpler and more secure parser than HTML?

A Markdown Web would look like the early Web.

6 comments

Markdown isn't part of the HTML spec any more than BBCode, and is therefore not "native" as far as browsers are concerned.

So they could but... why should they?

> Wouldn't that be a much simpler and more secure parser than HTML?

No, because Markdown allows for raw HTML, so a compliant Markdown parser must also include a complete HTML parser.

Thank you!
I've thought before that it would be neat to have the ability to specify an alternative markup inside any element. A kind of:

<div markup="markdown">Browser now _interprets_ content as markdown until end of div.</div>

It would make user-submitted content so much better since you could just directly embed bbcode, markdown, etc. without needing to parse it to html or validate that their submission is valid html/only using approved tags, etc.

I really wish they would. With just a small number of elements added to the Markdown standard (e.g. for plots, videos and audios and, perhaps, a standard way include referenced files in the markdown file itself) this would make the web (and e-mail!) I want.
Not standard, but it shouldn't be very hard to write an extension to handle this use case. I would like to see that happen, actually.
It's definitely not a can't.

Why don't they? Coordination is costly.