Wrapping can change line boundaries without changing words
Compare line count and trailing-newline state before reusing the wrapped output. Long-word breaking is destructive when enabled.
Repeatable text workflow
Use output as input only when the preview is what you intended. Restore returns to the page-load sample, and the before/after audit remains local to your browser.