Original markdown HTML blocks (the kind pandoc parses when you turn of the markdown_in_html_blocks
extension, as you are doing) must start at the beginning of the line. From the markdown syntax description:
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.
So this is what you need:
My text.
<div>
This will be ignored in non-HTML output
</div>