From 1888f61411470eb23f3388a88b260c52a5e2f228 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 25 Jul 2014 13:11:41 -0700 Subject: [PATCH] Preserve line breaks in standard remarkup fields Summary: Initially the change is aimed to solve issue with line breaks being lost in projects descriptions. But it is done in a general place so line breaks behavior is more consistent all over the place. Test Plan: - Write a multiline description of the project, using single \n for line breakers. - View project details in project/view/X? Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D10014 --- .../standard/PhabricatorStandardCustomFieldRemarkup.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldRemarkup.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldRemarkup.php index 931bfc6c9b..d05d5a9aba 100644 --- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldRemarkup.php +++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldRemarkup.php @@ -32,7 +32,9 @@ final class PhabricatorStandardCustomFieldRemarkup $viewer = $this->getViewer(); return PhabricatorMarkupEngine::renderOneObject( - id(new PhabricatorMarkupOneOff())->setContent($value), + id(new PhabricatorMarkupOneOff()) + ->setContent($value) + ->setPReserveLinebreaks(true), 'default', $viewer); }