Homec4science

Add phutil_split_lines() for \r/\r\n/\n-aware line explosion

Authored by epriestley <git@epriestley.com> on Sep 6 2012, 01:12.

Description

Add phutil_split_lines() for \r/\r\n/\n-aware line explosion

Summary:
We currently mishandle diffs with a mixture of \r, \n, and \r\n newlines (we discard them, but should retain them).

Add a function to correctly split a text corpus apart even if it has mixed newlines, since the regex wasn't exactly trivial.

Test Plan: Ran unit tests.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T866

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

Details

Committed
epriestley <git@epriestley.com>Sep 6 2012, 01:12
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU00f20310baa5: Hide option reference unless --full is passed
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU2281895c5d74: Add phutil_split_lines() for \r/\r\n/\n-aware line explosion (authored by epriestley <git@epriestley.com>).Sep 6 2012, 01:12