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
F19953915: D16061.diff
Mon, Apr 20, 8:12 AM
F19946084: D16061.diff
Thu, Apr 16, 10:30 PM
F19932738: D16061.id.diff
Fri, Apr 10, 8:03 PM
F19929231: D16061.id38647.diff
Wed, Apr 8, 3:21 PM
F19898824: D16061.id.diff
Sun, Mar 29, 3:59 PM
F19844836: D16061.id.diff
Mar 12 2026, 6:45 AM
F19815696: D16061.diff
Mar 4 2026, 11:59 PM
F19536163: D16061.diff
Jan 21 2026, 10:21 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
Branch
prose3
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 12516
Build 15872: Run Core Tests
Build 15871: arc lint + arc unit

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.