Please Check this video
I know exactly how Mend and Prettify works. This is not a case where nothing changes after the tags are cleaned up.
If you watch the video (the menus are in Korean), you'll see that Mend and Prettify does not reformat the code. However, if I close the XHTML tab, reopen it, and then run Mend and Prettify again, the code is formatted correctly.
I didn't use the CSS white-space property or the <pre> tag that KevinH mentioned.
It doesn't happen every time. Sometimes I perform the exact same split, edit the code, and then run Mend and Prettify, and it works as expected. However, in some cases, it behaves like it does in the video and doesn't reformat the code. Once it gets into this state, Mend and Prettify won't work until I close the tab and reopen it. Editing the code or switching to another tab and then coming back doesn't make any difference.
I haven't found a way to reproduce the issue 100% consistently yet, but it occurs frequently during normal editing. Once I figure out the exact steps to reproduce it, I'll share them with you.
Screen capture was blocked, so I recorded the video with my phone instead. The quality isn't great, but you should still be able to clearly see the issue.