diff --git a/notebook/static/notebook/js/codecell.js b/notebook/static/notebook/js/codecell.js index 0f6913c9a8..7f804b76dd 100644 --- a/notebook/static/notebook/js/codecell.js +++ b/notebook/static/notebook/js/codecell.js @@ -465,7 +465,7 @@ define([ } else { ns = encodeURIComponent(prompt_value); } - return 'In [' + ns + ']:'; + return 'In [' + ns + ']:'; }; CodeCell.input_prompt_continuation = function (prompt_value, lines_number) { diff --git a/notebook/static/notebook/js/outputarea.js b/notebook/static/notebook/js/outputarea.js index 4d14cf4d37..33a5ffa89b 100644 --- a/notebook/static/notebook/js/outputarea.js +++ b/notebook/static/notebook/js/outputarea.js @@ -455,7 +455,14 @@ define([ var toinsert = this.create_output_area(); this._record_display_id(json, toinsert); if (this.prompt_area) { - toinsert.find('div.prompt').addClass('output_prompt').text('Out[' + n + ']:'); + toinsert.find('div.prompt') + .addClass('output_prompt') + .empty() + .append( + $('').text('Out') + ).append( + '[' + n + ']:' + ); } var inserted = this.append_mime_type(json, toinsert); if (inserted) { diff --git a/notebook/tests/notebook/prompt_numbers.js b/notebook/tests/notebook/prompt_numbers.js index 21e6acd278..b4ca03e660 100644 --- a/notebook/tests/notebook/prompt_numbers.js +++ b/notebook/tests/notebook/prompt_numbers.js @@ -21,16 +21,16 @@ casper.notebook_test(function () { var a = 'print("a")'; var index = this.append_cell(a); - this.test.assertEquals(get_prompt(index), "In [ ]:", "prompt number is   by default"); + this.test.assertEquals(get_prompt(index), "In [ ]:", "prompt number is   by default"); set_prompt(index, 2); - this.test.assertEquals(get_prompt(index), "In [2]:", "prompt number is 2"); + this.test.assertEquals(get_prompt(index), "In [2]:", "prompt number is 2"); set_prompt(index, 0); - this.test.assertEquals(get_prompt(index), "In [0]:", "prompt number is 0"); + this.test.assertEquals(get_prompt(index), "In [0]:", "prompt number is 0"); set_prompt(index, "*"); - this.test.assertEquals(get_prompt(index), "In [*]:", "prompt number is *"); + this.test.assertEquals(get_prompt(index), "In [*]:", "prompt number is *"); set_prompt(index, undefined); - this.test.assertEquals(get_prompt(index), "In [ ]:", "prompt number is  "); + this.test.assertEquals(get_prompt(index), "In [ ]:", "prompt number is  "); set_prompt(index, null); - this.test.assertEquals(get_prompt(index), "In [ ]:", "prompt number is  "); + this.test.assertEquals(get_prompt(index), "In [ ]:", "prompt number is  "); }); });