GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): notebook preview shows outputs that carry only text/markdow… · patroza/t3code@fc1f1ba

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/web/src/components/files
    • FilePreviewPanel.test.ts
    • extendedDocumentPreview.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/web/src/components/files/FilePreviewPanel.test.ts‎

Copy file name to clipboardExpand all lines: apps/web/src/components/files/FilePreviewPanel.test.ts
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@ Third}`;
403403
text: ["\r 10%|# |", "\r100%|##########|\n", "done\r\n", "🚀 ready\rX\n"],
404404
},
405405
{ data: { "text/html": ["<b>Results</b>"], "text/plain": ["Results"] } },
406+
{ output_type: "display_data", data: { "text/markdown": ["| a |\n", "|---|"] } },
407+
{ data: { "text/plain": "plain wins", "text/markdown": "**markdown**" } },
406408
],
407409
},
408410
],
@@ -424,6 +426,8 @@ Third}`;
424426
{ kind: "text", text: "42\n" },
425427
{ kind: "text", text: "100%|##########|\ndone\nX ready\n" },
426428
{ kind: "html", text: "<b>Results</b>" },
429+
{ kind: "text", text: "| a |\n|---|" },
430+
{ kind: "text", text: "plain wins" },
427431
],
428432
},
429433
],
Collapse file

‎apps/web/src/components/files/extendedDocumentPreview.ts‎

Copy file name to clipboardExpand all lines: apps/web/src/components/files/extendedDocumentPreview.ts
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,12 @@ export function openNotebook(bytes: ArrayBuffer): OfficeWorkerResult {
530530
const html = notebookText(data["text/html"]);
531531
if (html.trim() && htmlImagesFit(html)) return { kind: "html" as const, text: html };
532532
const plain = terminalOutputPlainText(
533-
notebookText(output.text ?? data["text/plain"] ?? tracebackLines(output.traceback)),
533+
notebookText(
534+
output.text ??
535+
data["text/plain"] ??
536+
data["text/markdown"] ??
537+
tracebackLines(output.traceback),
538+
),
534539
);
535540
const text =
536541
output.output_type === "stream" ? terminalOutputCollapseRedraws(plain) : plain;

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.