DMH
DMH

Reputation: 2809

Pandoc escaping iframes during Markdown to HTML Convert

I am using Pandoc to convert markdown files to html in a Jekyll blog.

I am passing these flags to pandoc -t html5 --smart --section-divs --parse-raw but it does not seem to render the iframe. Here is a screenshot of what it produces.

Can anyone point me in the right direction so that it ends up being rendered correctly?

Here is the iframe in the markdown file

<div class="scratch-preview">
<iframe allowtransparency="true" width="485" height="402" src="http://scratch.mit.edu/projects/embed/26818098/?autostart=false" frameborder="0"></iframe>
<img src="space-final.png">
</div>

Upvotes: 4

Views: 1195

Answers (1)

tarleb
tarleb

Reputation: 22659

The issue has been discussed on github. The problem seems to be caused by indentation of the iframe being 4 spaces or more, causing it to be interpreted as code by markdown.

Upvotes: 3

Related Questions