Hi there, thanks for looking into this. HTML doesn’t care about line breaks, so technically this is correct:
<h2>
Heading test with line breaks
</h2>
It simply seems to be a problem of the Markdown parser running after/inside the HTML parser, which is generating <p> tags for the line returns.