mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
store nonexistent prompt number as null
This commit is contained in:
parent
220a5f0664
commit
7691f4f9fc
@ -15,7 +15,7 @@ var IPython = (function (IPython) {
|
||||
|
||||
var CodeCell = function (notebook) {
|
||||
this.code_mirror = null;
|
||||
this.input_prompt_number = ' ';
|
||||
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 || ' ';
|
||||
this.input_prompt_number = n;
|
||||
this.element.find('div.input_prompt').html('In [' + n + ']:');
|
||||
this.input_prompt_number = number;
|
||||
var ns = number || " ";
|
||||
this.element.find('div.input_prompt').html('In [' + 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 = [];
|
||||
|
Loading…
Reference in New Issue
Block a user