Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistWorkflow.php
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | if ($information) { | ||||
$examples = $information->getExamples(); | $examples = $information->getExamples(); | ||||
if ($examples) { | if ($examples) { | ||||
$examples = implode("\n", $examples); | $examples = implode("\n", $examples); | ||||
$phutil_workflow->setExamples($examples); | $phutil_workflow->setExamples($examples); | ||||
} | } | ||||
$help = $information->getHelp(); | $help = $information->getHelp(); | ||||
if (strlen($help)) { | if ($help !== null) { | ||||
// Unwrap linebreaks in the help text so we don't get weird formatting. | // Unwrap linebreaks in the help text so we don't get weird formatting. | ||||
$help = preg_replace("/(?<=\S)\n(?=\S)/", ' ', $help); | $help = preg_replace("/(?<=\S)\n(?=\S)/", ' ', $help); | ||||
$phutil_workflow->setHelp($help); | $phutil_workflow->setHelp($help); | ||||
} | } | ||||
} | } | ||||
return $phutil_workflow; | return $phutil_workflow; | ||||
▲ Show 20 Lines • Show All 2,305 Lines • Show Last 20 Lines |