From 8bee5f803f756f5d39fa175213afadaa4a3a7886 Mon Sep 17 00:00:00 2001 From: "Brian E. Granger" Date: Tue, 9 Aug 2011 14:36:38 -0700 Subject: [PATCH] Fixed text cell rendering bug. --- IPython/frontend/html/notebook/static/js/textcell.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/IPython/frontend/html/notebook/static/js/textcell.js b/IPython/frontend/html/notebook/static/js/textcell.js index 1d4ff772db1..a86ab866087 100644 --- a/IPython/frontend/html/notebook/static/js/textcell.js +++ b/IPython/frontend/html/notebook/static/js/textcell.js @@ -100,7 +100,7 @@ var IPython = (function (IPython) { }; - TextCell.prototype.get_rendered = function(text) { + TextCell.prototype.get_rendered = function() { return this.element.find('div.text_cell_render').html(); }; @@ -129,13 +129,16 @@ var IPython = (function (IPython) { TextCell.prototype.fromJSON = function (data) { + console.log(data); if (data.cell_type === this.cell_type) { if (data.source !== undefined) { this.set_source(data.source); - this.set_rendered(data.rendered); + this.set_rendered(data.rendered || ''); + this.rendered = false; + this.render(); }; }; - } + }; TextCell.prototype.toJSON = function () {