1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

Don't count "\r" or "\n" for purposes of linewrapping text in Differential

Summary: This should all go away at some point when we move to fluid layout, but don't be more annoying than necessary in the meantime.

Test Plan: Meta.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3788
This commit is contained in:
epriestley 2012-10-22 16:24:22 -07:00
parent 89b9d56cbe
commit c0b9b6db54

View file

@ -818,7 +818,9 @@ final class DifferentialChangesetParser {
$text,
$intra[$key]);
}
if (isset($corpus[$key]) && strlen($corpus[$key]) > $this->lineWidth) {
if (isset($corpus[$key]) &&
strlen($corpus[$key]) > $this->lineWidth &&
strlen(rtrim($corpus[$key], "\r\n")) > $this->lineWidth) {
$lines = phutil_utf8_hard_wrap_html($render[$key], $this->lineWidth);
$render[$key] = implode($line_break, $lines);
}