A bug was reported where line breaks in code blocks disappeared after editing a post. gerhard initially thought it might be a regression, but codinghorror explained that a blank line above the code block is required to maintain line breaks. gerhard noted that this wasn’t an issue when the post was created two weeks ago, and codinghorror suspected it might be related to changes made by sam. The issue was further investigated, and sam discovered that incorrect “hoisting” of code blocks was the root cause. sam fixed the hoisting issue, but noted that the rendering engine needs further improvement. The fix was implemented in this commit.
I have a few code blocks inside lists in my “Importing from phpBB3” topic. They looked fine when I posted this a few days ago. But now, after a small edit with insignificant changes, the line breaks inside the code blocks are gone.
The preview still looks fine:
The actual post however looks wrong:
Is this a regression or is there something wrong with my post?
and this incorrect hoisting, though not impacting the client that uses ember initializers to initialize dialects, did heavily impact the server that uses a different paradigm.
I fixed hoisting and unhoisting… but our architecture needs some TLC here, we need to split off the rendering engine into a cleaner, independent, multisite friendly piece.