mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
msgspec: stream.data -> stream.text
This commit is contained in:
parent
14cfb2efc1
commit
09acc6c854
@ -57,7 +57,7 @@ class APITest(NotebookTestBase):
|
||||
|
||||
nb.cells.append(new_heading_cell(u'Created by test ³'))
|
||||
cc1 = new_code_cell(source=u'print(2*6)')
|
||||
cc1.outputs.append(new_output(output_type="stream", data=u'12'))
|
||||
cc1.outputs.append(new_output(output_type="stream", text=u'12'))
|
||||
cc1.outputs.append(new_output(output_type="execute_result",
|
||||
mime_bundle={'image/png' : png_green_pixel},
|
||||
execution_count=1,
|
||||
|
@ -453,7 +453,7 @@ define([
|
||||
|
||||
|
||||
OutputArea.prototype.append_stream = function (json) {
|
||||
var text = json.data;
|
||||
var text = json.text;
|
||||
var subclass = "output_"+json.name;
|
||||
if (this.outputs.length > 0){
|
||||
// have at least one output to consider
|
||||
@ -462,9 +462,9 @@ define([
|
||||
// latest output was in the same stream,
|
||||
// so append directly into its pre tag
|
||||
// escape ANSI & HTML specials:
|
||||
last.data = utils.fixCarriageReturn(last.data + json.data);
|
||||
last.text = utils.fixCarriageReturn(last.text + json.text);
|
||||
var pre = this.element.find('div.'+subclass).last().find('pre');
|
||||
var html = utils.fixConsole(last.data);
|
||||
var html = utils.fixConsole(last.text);
|
||||
// The only user content injected with this HTML call is
|
||||
// escaped by the fixConsole() method.
|
||||
pre.html(html);
|
||||
|
Loading…
Reference in New Issue
Block a user