as I’d meant to do shows it correctly and consistently. I’m not sure what the expected behavior of the strangely ordered markdown + HTML should be, but it should at least be consistent between the preview and the actual post.
I was referring specifically to Discourse’s rendering engine. I get that it’s not supported to use misordered tags. I was just curious if, for example, there are two separate implementations, whether the algorithm is nondeterministic, etc.
There are differences in markup between the preview and topics. Most of them are related to some content being added on the server side (like one boxes), but others are as simple as where it is in the DOM. The composer has a different HTML structure than the posts view, and that’s enough to make a difference in unsupported behaviour like this.