@laurent, Here are my findings in detail.
The complete Markdown note
Who wins?
=========
##### H5
###### H6
<div class="different">
##### H5
###### H6
</div>
* * *
Should be <span style="color: red;">red</span>.
* * *
<style>
.different h5 { color: lightgreen; }
h5 { color: orange; }
h6 { color: orange; }
.different h6 { color: lightgreen; }
</style>
HTML generated by v1.0.179
<div id="rendered-md"><h1 id="who-wins">Who wins?</h1>
<h5 id="h5">H5</h5>
<h6 id="h6">H6</h6>
<div class="different">
<h5 id="h5-2">H5</h5>
<h6 id="h6-2">H6</h6>
</div>
<hr>
<p>Should be <span style="color: red;">red</span>.</p>
<hr>
<style>
.different h5 { color: lightgreen; }
h5 { color: orange; }
h6 { color: orange; }
.different h6 { color: lightgreen; }
</style>
</div>
HTML generated by v1.0.189
<div id="rendered-md"><h1 id="who-wins">Who wins?</h1>
<h5 id="h5">H5</h5>
<h6 id="h6">H6</h6>
<div class="different">
</div><h5 id="h5-2">H5</h5>
<h6 id="h6-2">H6</h6>
<<hr>
<p>Should be red.</p>
<hr>
<style>
.different h5 { color: lightgreen; }
h5 { color: orange; }
h6 { color: orange; }
.different h6 { color: lightgreen; }
</style>
</div>
Below is the rendering in the viewer, the generated HTML and the styling. Joplin 1.0.179 on Win10 is at the left side, and behaves as I expect (based on my knowlegde of CommonMark, HTML and CSS). The right side shows Joplin 1.0.189 on macOS Mojave. It has dropped some HTML, generated the </div>
tag to early, choked on the explicit </div>
tag, and skipped some styling directions.
My apologies for sending screenshots again. I could not find a way to retrieve the style specs from the development tool as text. And as you can see, there is a tiny discrepancy between the graphical representation of the HTML and its text format: the extra quoting of phrases. That’s why I include both formats in this post.