In the attached testcase, you will see white-space at the start of lines. This basically shouldn't happen unless that space is after a line that broke cleanly (or the first line). Breaking is occurring in the middle of runs of white-space, and it should only be allowed to occur at the end of the run of white-space.
Created attachment 4561 [details] Test Case
Created attachment 4585 [details] Patch that collapses white-space for pre-wrap at the start of lines that didn't break cleanly.
Comment on attachment 4585 [details] Patch that collapses white-space for pre-wrap at the start of lines that didn't break cleanly. r=me