From 0e4dbb28800ded4e17d300d2ed4510d4ee344f9c Mon Sep 17 00:00:00 2001 From: v923z Date: Fri, 20 Jul 2012 15:03:33 +0300 Subject: [PATCH] Added checking for emptiness of cell below. --- IPython/frontend/html/notebook/static/js/notebook.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js index 39f61e857..9a8e84823 100644 --- a/IPython/frontend/html/notebook/static/js/notebook.js +++ b/IPython/frontend/html/notebook/static/js/notebook.js @@ -118,7 +118,7 @@ var IPython = (function (IPython) { // Execute code cell, and insert new in place that.execute_selected_cell(); // Only insert a new cell, if we ended up in an already populated cell - if (that.get_selected_cell().toJSON().input !== "") { + if (/\S/.test(that.get_selected_cell().toJSON().input) == true) { that.insert_cell_above('code'); } return false;