From 5964f1f4190eed94ad096e921aae6aaeda1641da 2011-12-24 18:59:17
From: MinRK <benjaminrk@gmail.com>
Date: 2011-12-24 18:59:17
Subject: [PATCH] store nonexistent prompt number as null

---

diff --git a/IPython/frontend/html/notebook/static/js/codecell.js b/IPython/frontend/html/notebook/static/js/codecell.js
index 7bcd57a..0d99d47 100644
--- a/IPython/frontend/html/notebook/static/js/codecell.js
+++ b/IPython/frontend/html/notebook/static/js/codecell.js
@@ -15,7 +15,7 @@ var IPython = (function (IPython) {
 
     var CodeCell = function (notebook) {
         this.code_mirror = null;
-        this.input_prompt_number = '&nbsp;';
+        this.input_prompt_number = null;
         this.is_completing = false;
         this.completion_cursor = null;
         this.outputs = [];
@@ -757,9 +757,9 @@ var IPython = (function (IPython) {
     };
 
     CodeCell.prototype.set_input_prompt = function (number) {
-        var n = number || '&nbsp;';
-        this.input_prompt_number = n;
-        this.element.find('div.input_prompt').html('In&nbsp;[' + n + ']:');
+        this.input_prompt_number = number;
+        var ns = number || "&nbsp;";
+        this.element.find('div.input_prompt').html('In&nbsp;[' + ns + ']:');
     };
 
 
@@ -821,7 +821,7 @@ var IPython = (function (IPython) {
         var data = {};
         data.input = this.get_code();
         data.cell_type = 'code';
-        if (this.input_prompt_number !== ' ') {
+        if (this.input_prompt_number) {
             data.prompt_number = this.input_prompt_number;
         };
         var outputs = [];