Page MenuHomePhabricator

Slightly improve prose diffs for text ending in newlines or punctuation
ClosedPublic

Authored by epriestley on Jun 6 2016, 8:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 16, 6:56 AM
Unknown Object (File)
Thu, Feb 13, 11:27 AM
Unknown Object (File)
Tue, Feb 11, 3:10 AM
Unknown Object (File)
Sun, Feb 9, 1:45 AM
Unknown Object (File)
Mon, Feb 3, 3:43 AM
Unknown Object (File)
Thu, Jan 23, 3:42 PM
Unknown Object (File)
Tue, Jan 21, 10:31 AM
Unknown Object (File)
Jan 18 2025, 3:25 AM
Subscribers
None

Details

Summary

Ref T3353. Currently, if text ends in newlines (or some other types of punctuation) we generate an extra piece at the end which can muck up the algorithm.

Do a slightly better job with this.

Test Plan

Viewed a diff between "a\nb\nc\n" and "a\nb\nc\nd\n", got a cleaner diff out of it.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Slightly improve prose diffs for text ending in newlines or punctuation.
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.Jun 6 2016, 8:58 PM
This revision was automatically updated to reflect the committed changes.