Page MenuHomePhabricator

Slightly improve some prose diffs
ClosedPublic

Authored by epriestley on Nov 7 2016, 10:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 9, 11:26 PM
Unknown Object (File)
Sat, Nov 9, 8:04 PM
Unknown Object (File)
Sat, Oct 26, 4:54 PM
Unknown Object (File)
Tue, Oct 22, 10:00 PM
Unknown Object (File)
Oct 14 2024, 2:11 AM
Unknown Object (File)
Sep 27 2024, 6:00 AM
Unknown Object (File)
Sep 23 2024, 2:36 PM
Unknown Object (File)
Sep 15 2024, 10:32 PM
Subscribers
None

Details

Summary

Ref T7643. There are still some silly cases, but I think this improves behavior a bit:

  • At the top level, treat whitespace tokens separately. This significantly improves adding or removing paragraphs.
  • Fix a bug with diff construction where prefixes and suffixes could overlap on pure whitespace tokens.

There are still some other cases that we don't do a great job on but I think I need to adjust the approach a bit to really improve them.

Test Plan

Added a unit test with a pargraph addition, made it pass.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Slightly improve some prose diffs.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Nov 7 2016, 10:53 PM
This revision was automatically updated to reflect the committed changes.