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
F15555388: D16061.id.diff
Mon, Apr 28, 11:10 AM
F15552175: D16061.diff
Sun, Apr 27, 7:40 PM
F15531311: D16061.id38647.diff
Wed, Apr 23, 10:35 AM
F15473621: D16061.id38647.diff
Apr 6 2025, 12:23 AM
F15433952: D16061.id.diff
Mar 25 2025, 1:21 AM
F15433011: D16061.id38645.diff
Mar 24 2025, 8:52 PM
F15424156: D16061.id38647.diff
Mar 22 2025, 8:36 PM
F15409967: D16061.diff
Mar 19 2025, 6:16 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.