Page MenuHomePhabricator

Slightly improve some prose diffs
ClosedPublic

Authored by epriestley on Nov 7 2016, 10:44 PM.
Tags
None
Referenced Files
F14089003: D16820.diff
Sun, Nov 24, 7:24 AM
Unknown Object (File)
Fri, Nov 22, 2:27 AM
Unknown Object (File)
Thu, Nov 21, 10:08 PM
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)
Oct 22 2024, 10:00 PM
Unknown Object (File)
Oct 14 2024, 2:11 AM
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.