Update: turns out it wasn't a bug (see the end of the post and the answer)
Original bug report:
Why does this edit comes out looking like this:
Notice that the code on the image is bold despite the fact that it's outside of the
Looking at the page's elements (using Developer tools) shows that the code ended up inside an
<h2> tag and I can't understand why.
I tried to reproduce this here, but no luck so far.
I tried copying the exact markdown here. Still can't reproduce anywhere except on the original page.
Managed to reproduce bug here https://meta.stackexchange.com/a/288690/308440
Managed to reproduce with this markdown:
Edit: turns out this wasn't a bug after all. https://stackoverflow.com/editing-help#headers. Sorry. Ready to get closed/deleted.