Apply edit smoothing to prose diffs
These are technically correct (they minimize edit distance), but not how a human would diff them. A human can more easily parse an entire word change than the technically-more-accurate character-by-character diff.
Apply "smoothing" on these word-level and character-level diffs to avoid producing runs of changes when some characters are shared in a word edit.
We already do this in arc for normal intraline diffs (and have for years) and it seems to work well. I'll update that code to use this same method.
Add unit tests, ran unit tests.
Got a better diff in the UI for this class of edit:
Reviewed By: chad
Maniphest Tasks: T7643
Differential Revision: https://secure.phabricator.com/D16068