From c5b244bfd04fe8a549f1066ecbad469f6ce82834 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 26 Mar 2018 07:21:24 -0700 Subject: [PATCH] Render directly embedded image data represented as a string in Jupyter notebooks Summary: Depends on D19259. Ref T13105. Some examples represent image data as `["da", "ta"]` while others represent it as `"data"`. Accept either. Test Plan: Rendered example notebooks with both kinds of images. Reviewers: mydeveloperday Reviewed By: mydeveloperday Maniphest Tasks: T13105 Differential Revision: https://secure.phabricator.com/D19260 --- .../files/document/PhabricatorJupyterDocumentEngine.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/applications/files/document/PhabricatorJupyterDocumentEngine.php b/src/applications/files/document/PhabricatorJupyterDocumentEngine.php index f960f5c8c0..93181921af 100644 --- a/src/applications/files/document/PhabricatorJupyterDocumentEngine.php +++ b/src/applications/files/document/PhabricatorJupyterDocumentEngine.php @@ -260,9 +260,8 @@ final class PhabricatorJupyterDocumentEngine $raw_data = $data[$image_format]; if (!is_array($raw_data)) { - continue; + $raw_data = array($raw_data); } - $raw_data = implode('', $raw_data); $content = phutil_tag(