This is being opened as a task because of something that arose on Latin Wikisource. (It's not necessarily a bug, but a concern.)
The one on the left was being treated as having Misnested <i></i> pairs.
The one on the right is not The only difference being the collapsing of white space and end of lines inside the <i></i> pairs.
Given that contributors may not be aware that <i></i> and <b></b> etc are perhaps supposed to be what the HTML spec calls phrasing content (Span-like) vs the flow content that a <p></p> (block content) would be it would be appreciated, if what's happening in the former page is confirmed as being by intention as well as by implementation.