From eb99c8076628e70591891985cb41cc4f60967b05 2014-03-10 18:44:00 From: MinRK Date: 2014-03-10 18:44:00 Subject: [PATCH] call append_text from append_map --- diff --git a/IPython/html/static/notebook/js/outputarea.js b/IPython/html/static/notebook/js/outputarea.js index cce7bb8..4a2f750 100644 --- a/IPython/html/static/notebook/js/outputarea.js +++ b/IPython/html/static/notebook/js/outputarea.js @@ -425,7 +425,10 @@ var IPython = (function (IPython) { } s = s + '\n'; var toinsert = this.create_output_area(); - this.append_text(s, {}, toinsert).addClass('output_pyerr'); + var append_text = OutputArea.append_map['text/plain']; + if (append_text) { + append_text.apply(this, [s, {}, toinsert]).addClass('output_pyerr'); + } this._safe_append(toinsert); } }; @@ -434,7 +437,7 @@ var IPython = (function (IPython) { OutputArea.prototype.append_stream = function (json) { // temporary fix: if stream undefined (json file written prior to this patch), // default to most likely stdout: - if (json.stream == undefined){ + if (json.stream === undefined){ json.stream = 'stdout'; } var text = json.text; @@ -464,7 +467,10 @@ var IPython = (function (IPython) { // If we got here, attach a new div var toinsert = this.create_output_area(); - this.append_text(text, {}, toinsert).addClass("output_stream "+subclass); + var append_text = OutputArea.append_map['text/plain']; + if (append_text) { + append_text.apply(this, [text, {}, toinsert]).addClass("output_stream " + subclass); + } this._safe_append(toinsert); };