When toggled closed, header is badly formatted if it contains a code fence at the end

A post was merged into an existing topic: When a header (or a list item) that contains a code block is folded, the format is wrong