Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/web/src/components/files/FilePreviewPanel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@ Third}`;
{ output_type: "display_data", data: {} },
{ data: { "text/html": [""] } },
{ data: { "text/html": [], "text/plain": "array fallback" } },
{ data: { "text/html": "", "text/plain": "string fallback" } },
{ data: { "text/html": "", "text/plain": "\u001b[1mstring fallback\u001b[0m" } },
{ data: { "text/html": " ", "text/plain": "space fallback" } },
{ output_type: "stream", text: ["42\n"] },
{ output_type: "stream", text: ["\u001b[", "32m42\u001b[0m\n"] },
{ data: { "text/html": ["<b>Results</b>"], "text/plain": ["Results"] } },
],
},
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/files/extendedDocumentPreview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,8 @@ export function openNotebook(bytes: ArrayBuffer): OfficeWorkerResult {
if (html.trim() && htmlImagesFit(html)) return { kind: "html" as const, text: html };
return {
kind: "text" as const,
text: notebookText(
output.text ?? data["text/plain"] ?? tracebackLines(output.traceback),
text: terminalOutputPlainText(
notebookText(output.text ?? data["text/plain"] ?? tracebackLines(output.traceback)),
),
};
})
Expand Down
Loading