1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 20:40:56 +01:00

Preserve linebreaks again in Summary / Test Plan for revisions

Summary:
I pulled these into the property list recently, which made them more consistent, but that dropped "preserve linebreaks". Since these usually come from the CLI, render with linebreaks preserved.

@csilvers, you'll need to `bin/cache purge --purge-remarkup` after this if you want to fix existing revisions.

Test Plan: Made a revision with some poetry, saw poetry preserved.

Reviewers: btrahan, csilvers

Reviewed By: btrahan

CC: csilvers, aran

Differential Revision: https://secure.phabricator.com/D7464
This commit is contained in:
epriestley 2013-10-30 17:20:06 -07:00
parent 2250ee6aa6
commit 2f7057ad99

View file

@ -118,8 +118,9 @@ final class DifferentialRevisionDetailView extends AphrontView {
$properties->addSectionHeader(pht('Summary'));
$properties->addTextContent(
PhabricatorMarkupEngine::renderOneObject(
id(new PhabricatorMarkupOneOff())->setContent(
$revision->getSummary()),
id(new PhabricatorMarkupOneOff())
->setPreserveLinebreaks(true)
->setContent($revision->getSummary()),
'default',
$user));
}
@ -128,8 +129,9 @@ final class DifferentialRevisionDetailView extends AphrontView {
$properties->addSectionHeader(pht('Test Plan'));
$properties->addTextContent(
PhabricatorMarkupEngine::renderOneObject(
id(new PhabricatorMarkupOneOff())->setContent(
$revision->getTestPlan()),
id(new PhabricatorMarkupOneOff())
->setPreserveLinebreaks(true)
->setContent($revision->getTestPlan()),
'default',
$user));
}