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
F15473621: D16061.id38647.diff
Sun, Apr 6, 12:23 AM
F15433952: D16061.id.diff
Tue, Mar 25, 1:21 AM
F15433011: D16061.id38645.diff
Mon, Mar 24, 8:52 PM
F15424156: D16061.id38647.diff
Sat, Mar 22, 8:36 PM
F15409967: D16061.diff
Wed, Mar 19, 6:16 AM
F15409302: D16061.id38645.diff
Wed, Mar 19, 4:04 AM
F15406597: D16061.id.diff
Tue, Mar 18, 12:49 PM
F15402208: D16061.diff
Mon, Mar 17, 9:21 PM
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.