Skip to content

Commit 146dae0

Browse files
authored
Fixes to escaping of output in native notebooks (#14199)
1 parent afc155b commit 146dae0

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/client/datascience/jupyter/kernels/cellExecution.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -426,12 +426,7 @@ export class CellExecution {
426426
}
427427

428428
private async addToCellData(
429-
output:
430-
| nbformat.IUnrecognizedOutput
431-
| nbformat.IExecuteResult
432-
| nbformat.IDisplayData
433-
| nbformat.IStream
434-
| nbformat.IError,
429+
output: nbformat.IExecuteResult | nbformat.IDisplayData | nbformat.IStream | nbformat.IError,
435430
clearState: RefBool
436431
) {
437432
const converted = cellOutputToVSCCellOutput(output);
@@ -494,6 +489,7 @@ export class CellExecution {
494489
output_type: 'stream',
495490
// tslint:disable-next-line: no-any
496491
text: (o.data as any)['text/plain'].toString(),
492+
name: 'stdout',
497493
metadata: {},
498494
execution_count: reply.execution_count
499495
},
@@ -533,7 +529,7 @@ export class CellExecution {
533529
if (existing && 'text/plain' in existing.data) {
534530
// tslint:disable-next-line:restrict-plus-operands
535531
existing.data['text/plain'] = formatStreamText(
536-
concatMultilineString(`${existing.data['text/plain']}${escape(msg.content.text)}`)
532+
concatMultilineString(`${existing.data['text/plain']}${msg.content.text}`)
537533
);
538534
edit.replaceCellOutput(this.cellIndex, [...exitingCellOutput]); // This is necessary to get VS code to update (for now)
539535
} else {

0 commit comments

Comments
 (0)