|
@@ -737,27 +737,22 @@ class OutputWidget extends Widget {
|
|
|
this.setOutput(child);
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
// Extract the data from the output and sanitize if necessary.
|
|
|
let rendermime = this._rendermime;
|
|
|
let bundle = this.getBundle(output as nbformat.IOutput);
|
|
|
let data = this.convertBundle(bundle);
|
|
|
-
|
|
|
// Clear the content.
|
|
|
this.clear();
|
|
|
|
|
|
// Bail if no data to display.
|
|
|
- let msg = 'Did not find renderer for output mimebundle.';
|
|
|
if (!data) {
|
|
|
- console.log(msg);
|
|
|
+ console.warn('Did not find renderer for output mimebundle.');
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
// Create the output result area.
|
|
|
let child = rendermime.render({ bundle: data, trusted, injector });
|
|
|
if (!child) {
|
|
|
- console.log(msg);
|
|
|
- console.log(data);
|
|
|
return;
|
|
|
}
|
|
|
this.setOutput(child);
|
|
@@ -782,6 +777,8 @@ class OutputWidget extends Widget {
|
|
|
case 'error':
|
|
|
child.addClass(ERROR_CLASS);
|
|
|
break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -827,8 +824,9 @@ class OutputWidget extends Widget {
|
|
|
bundle = (output as nbformat.IDisplayData).data;
|
|
|
break;
|
|
|
case 'stream':
|
|
|
+ let text = (output as nbformat.IStream).text;
|
|
|
bundle = {
|
|
|
- 'application/vnd.jupyter.console-text': (output as nbformat.IStream).text
|
|
|
+ 'application/vnd.jupyter.console-text': text
|
|
|
};
|
|
|
break;
|
|
|
case 'error':
|
|
@@ -839,6 +837,8 @@ class OutputWidget extends Widget {
|
|
|
`${out.ename}: ${out.evalue}`
|
|
|
};
|
|
|
break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
}
|
|
|
return bundle || {};
|
|
|
}
|