Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/document/PhabricatorJupyterDocumentEngine.php
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | private function newCodeCell(array $cell) { | ||||
$content = idx($cell, 'source'); | $content = idx($cell, 'source'); | ||||
if (!is_array($content)) { | if (!is_array($content)) { | ||||
$content = array(); | $content = array(); | ||||
} | } | ||||
$content = implode('', $content); | $content = implode('', $content); | ||||
$content = PhabricatorSyntaxHighlighter::highlightWithLanguage( | $content = PhabricatorSyntaxHighlighter::highlightWithLanguage( | ||||
'python', | 'py', | ||||
$content); | $content); | ||||
$outputs = array(); | $outputs = array(); | ||||
$output_list = idx($cell, 'outputs'); | $output_list = idx($cell, 'outputs'); | ||||
if (is_array($output_list)) { | if (is_array($output_list)) { | ||||
foreach ($output_list as $output) { | foreach ($output_list as $output) { | ||||
$outputs[] = $this->newOutput($output); | $outputs[] = $this->newOutput($output); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |