Skip to content

Commit 4527b4a

Browse files
committed
fix: Fix markdown outputs not rendering
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
1 parent 9f0d02b commit 4527b4a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/notebooks/deepnote/deepnoteDataConverter.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ export class DeepnoteDataConverter {
236236
for (const item of output.items) {
237237
if (item.mime === 'text/plain') {
238238
data['text/plain'] = new TextDecoder().decode(item.data);
239+
} else if (item.mime === 'text/markdown') {
240+
data['text/markdown'] = new TextDecoder().decode(item.data);
239241
} else if (item.mime === 'text/html') {
240242
data['text/html'] = new TextDecoder().decode(item.data);
241243
} else if (item.mime === 'application/json') {
@@ -392,6 +394,10 @@ export class DeepnoteDataConverter {
392394
);
393395
}
394396

397+
if (data['text/markdown']) {
398+
items.push(NotebookCellOutputItem.text(data['text/markdown'] as string, 'text/markdown'));
399+
}
400+
395401
if (data['text/plain']) {
396402
let mimeType = 'text/plain';
397403
// deepnote-toolkit returns the text/plain mime type for big number outputs

0 commit comments

Comments
 (0)