The issue in this bug was caused by reader mode replacing the 'pre' tag that we use to wrap plaintext documents with a series of paragraphs. This change affected the original document. Instead, we can put the paragraphs in a clone of the original document, which is fine for reader mode and avoids altering the original. Differential Revision: https://phabricator.services.mozilla.com/D79713