by Arnavion · 10y ago · 0 comments
But then you can't embed markdown inside the HTML, like code blocks inside a table. Sure you can use <pre><code> tags, but then you lose syntax highlighting.
Actually I've always wondered why no MD renderer supports something like
<code data-lang="js">
which it then treats the same as a ```js
code block. Or a pseudo <x-markdown> element... <td>
```js
console.log("Hello, world!");
```
</td>
will work as expected. http://spec.commonmark.org/0.26/#example-118 and further discussion at http://spec.commonmark.org/0.26/#example-153VSCode's markdown preview renderer ( https://github.com/markdown-it/markdown-it ) implements CommonMark, so I'm very happy right now :)
Pandoc supports this with the `markdown_in_html_blocks` option.