Homestyx hydra
Diffusion hydra f6cb51562efd

Use phutil_split_lines() in Differential

Description

Use phutil_split_lines() in Differential

Summary:

  • We currently treat "\r" as a newline, but should not because VCSes do not.
  • We get an extra empty line at the end of diffs created after D3442 because we now retain newlines.
  • Historically we've converted tab pre-cache, but do it post-cache instead so we can add prefs about it, as we should handle it better than we do (e.g., let the user set it to a different width, infer width from comments in the file, expand it to actual tab stops, or show it visually in some way).

Test Plan:

  • Verified diffs no longer have an empty line at the end.
  • Created a diff of a "\r" file and verified it displayed somewhat reasonably. All browsers treat "\r" as a real newline so it's not necessarily perfect, but we can clean that up later. Hopefully these files are exceedingly rare.
  • Created a file with tabs and verified it came out reasonably.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1857

Differential Revision: https://secure.phabricator.com/D3759

Details

Provenance
epriestleyAuthored on Oct 20 2012, 9:13 AM
sirocylPushed on Oct 16 2024, 5:49 AM
Parents
R1:fd87a88d710e: Fix static variable usage in Lisk
Branches
Unknown
Tags
Unknown

Event Timeline