From b1f1ddea6be749fe41c8e38eb0b581dd04eeeb00 2011-07-27 16:16:36 From: Brian E. Granger Date: 2011-07-27 16:16:36 Subject: [PATCH] Removing default input prompt number. In a notebook setting being able to delete and add cells makes it virtually impossible to correctly guess what the next input prompt number should be. We now follow the convention that our prompts look like "In [ ]:" before execution. --- diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js index a394747..9a80426 100644 --- a/IPython/frontend/html/notebook/static/js/notebook.js +++ b/IPython/frontend/html/notebook/static/js/notebook.js @@ -302,7 +302,8 @@ var IPython = (function (IPython) { // TODO: Bounds check for i var i = this.index_or_selected(index); var cell = new IPython.CodeCell(this); - cell.set_input_prompt(this.next_prompt_number); + // cell.set_input_prompt(this.next_prompt_number); + cell.set_input_prompt(); this.next_prompt_number = this.next_prompt_number + 1; this.insert_cell_before(cell, i); this.select(this.find_cell_index(cell)); @@ -314,7 +315,8 @@ var IPython = (function (IPython) { // TODO: Bounds check for i var i = this.index_or_selected(index); var cell = new IPython.CodeCell(this); - cell.set_input_prompt(this.next_prompt_number); + // cell.set_input_prompt(this.next_prompt_number); + cell.set_input_prompt(); this.next_prompt_number = this.next_prompt_number + 1; this.insert_cell_after(cell, i); this.select(this.find_cell_index(cell));