logoalt Hacker News

Someonetoday at 6:07 PM0 repliesview on HN

> It's just headers, lists, block quotes, codeblocks, and a few inner emphasis and link formatters, basically

That, and in-line HTML. https://daringfireball.net/projects/markdown/syntax#html:

“For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags.

The only restrictions are that block-level HTML elements — e.g. <div>, <table>, <pre>, <p>, etc. — must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) <p> tags around HTML block-level tags.”

Because of that, I think I would use a html renderer to render markdown. Because people allowing arbitrary HTML opens a huge can of worms I might also whitelist a restricted set of HTML.