diff --git a/IPython/html/static/notebook/js/textcell.js b/IPython/html/static/notebook/js/textcell.js index fd9f7da..71e604a 100644 --- a/IPython/html/static/notebook/js/textcell.js +++ b/IPython/html/static/notebook/js/textcell.js @@ -163,6 +163,7 @@ define([ * */ TextCell.prototype.set_text = function(text) { this.code_mirror.setValue(text); + this.unrender(); this.code_mirror.refresh(); }; diff --git a/IPython/html/tests/notebook/markdown.js b/IPython/html/tests/notebook/markdown.js index 0c1f61e..5f28d31 100644 --- a/IPython/html/tests/notebook/markdown.js +++ b/IPython/html/tests/notebook/markdown.js @@ -17,20 +17,31 @@ casper.notebook_test(function () { $('#to_code').mouseenter().click(); $('#to_markdown').mouseenter().click(); var cell = IPython.notebook.get_selected_cell(); - cell.set_text('# Foo'); + cell.set_text('# Bar'); $('#run_cell').mouseenter().click(); return cell.get_rendered(); }); - this.test.assertEquals(output.trim(), '