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)
Wed, May 1, 12:28 AM
Unknown Object (File)
Mon, Apr 29, 7:03 AM
Unknown Object (File)
Sun, Apr 28, 7:22 AM
Unknown Object (File)
Fri, Apr 19, 5:37 PM
Unknown Object (File)
Sun, Apr 14, 11:58 AM
Unknown Object (File)
Mon, Apr 8, 1:48 AM
Unknown Object (File)
Mon, Apr 8, 1:07 AM
Unknown Object (File)
Apr 2 2024, 4:17 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
Branch
diff1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 14391
Build 18743: Run Core Tests
Build 18742: arc lint + arc unit

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.