A discussion about the inconsistency in rendering markdown + HTML between the preview and actual post in Discourse. seanblue noticed the issue when using and bold tags in an unusual order, which was corrected when the tags were reordered. codinghorror stated that inconsistent ordering of tags is not supported in any markup engine and will produce bad results. When asked about the specific differences in rendering between the preview and posts, eviltrout explained that there are differences in markup due to server-side content addition and variations in HTML structure between the composer and posts view, which can cause inconsistencies.
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.