msgspec: stream.data -> stream.text

This commit is contained in:
MinRK 2014-08-27 12:59:44 -07:00 committed by Min RK
parent 14cfb2efc1
commit 09acc6c854
2 changed files with 4 additions and 4 deletions

View File

@ -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,

View File

@ -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);