Markdown inside raw HTML not rendered correctly

Steps to reproduce

Running Mac Obsidian 0.14.15 with the legacy editor and entering the following Markdown content:

<div class="myClass">

*Emphasized* text.

</div>

Expected result

Given that Obsidian wraps content in div blocks, and per example 108 in the CommonMark specification, the above content should be rendered into HTML as:

<div>
   <div class="myClass">
      <p><em>Emphasized</em> text.</p>
   </div>
</div>

Actual result

Instead of the expected result, Obsidian is creating two div blocks. One contains the raw HTML and the other holds the rendered Markdown

<div>
   <div class="myClass"></div>
</div>
<div>
   <p><em>Emphasized</em> text.</p>
</div>

This can be easily seen using the developer tool’s element inspector (CMD+OPT+I)

This has been asked other times. We don’t support markdown in html blocks and html blocks bust not contain empty lines.

Also, please do NOT use the legacy editor. it will be disappearing soon.