From 09acc6c854c6aa3ee2921c27aa2235854f03fe53 Mon Sep 17 00:00:00 2001 From: MinRK Date: Wed, 27 Aug 2014 12:59:44 -0700 Subject: [PATCH] msgspec: stream.data -> stream.text --- IPython/html/nbconvert/tests/test_nbconvert_handlers.py | 2 +- IPython/html/static/notebook/js/outputarea.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/IPython/html/nbconvert/tests/test_nbconvert_handlers.py b/IPython/html/nbconvert/tests/test_nbconvert_handlers.py index 4fb270529..6ef44730e 100644 --- a/IPython/html/nbconvert/tests/test_nbconvert_handlers.py +++ b/IPython/html/nbconvert/tests/test_nbconvert_handlers.py @@ -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, diff --git a/IPython/html/static/notebook/js/outputarea.js b/IPython/html/static/notebook/js/outputarea.js index 81c49edec..aa970ee88 100644 --- a/IPython/html/static/notebook/js/outputarea.js +++ b/IPython/html/static/notebook/js/outputarea.js @@ -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);