mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
changed wordwrap call to utf8 hard wrap call in multiple places
Summary: using to phutil_utf8_hard_wrap instead of wordwrap Test Plan: hard_wrap already unit tested Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5155
This commit is contained in:
parent
9891394e80
commit
37ee66e27f
3 changed files with 6 additions and 8 deletions
|
@ -570,8 +570,8 @@ final class ManiphestTransactionDetailView extends ManiphestView {
|
|||
case ManiphestTransactionType::TYPE_DESCRIPTION:
|
||||
$id = $transaction->getID();
|
||||
|
||||
$old_text = wordwrap($transaction->getOldValue(), 80);
|
||||
$new_text = wordwrap($transaction->getNewValue(), 80);
|
||||
$old_text = phutil_utf8_hard_wrap($transaction->getOldValue(), 80);
|
||||
$new_text = phutil_utf8_hard_wrap($transaction->getNewValue(), 80);
|
||||
|
||||
$engine = new PhabricatorDifferenceEngine();
|
||||
$changeset = $engine->generateChangesetFromFileContent($old_text,
|
||||
|
|
|
@ -48,8 +48,8 @@ final class PhrictionDiffController
|
|||
$text_l = $content_l->getContent();
|
||||
$text_r = $content_r->getContent();
|
||||
|
||||
$text_l = wordwrap($text_l, 80);
|
||||
$text_r = wordwrap($text_r, 80);
|
||||
$text_l = phutil_utf8_hard_wrap($text_l, 80);
|
||||
$text_r = phutil_utf8_hard_wrap($text_r, 80);
|
||||
|
||||
|
||||
$engine = new PhabricatorDifferenceEngine();
|
||||
|
|
|
@ -23,10 +23,8 @@ final class PhabricatorApplicationTransactionTextDiffDetailView
|
|||
// TODO: On mobile, or perhaps by default, we should switch to 1-up once
|
||||
// that is built.
|
||||
|
||||
// TODO: This should be utf8-aware, but we don't currently have a plain-text
|
||||
// utf8 hard-wrap function. See T2554.
|
||||
$old = wordwrap($old, 80);
|
||||
$new = wordwrap($new, 80);
|
||||
$old = phutil_utf8_hard_wrap($old, 80);
|
||||
$new = phutil_utf8_hard_wrap($new, 80);
|
||||
|
||||
$engine = new PhabricatorDifferenceEngine();
|
||||
$changeset = $engine->generateChangesetFromFileContent($old, $new);
|
||||
|
|
Loading…
Reference in a new issue