##// END OF EJS Templates
Adding prompt area to non-CodeCells to indent content....
Adding prompt area to non-CodeCells to indent content. This is a reponse to the problem of having really long lines in Markdown cells, which makes the content difficult to read. Users want wide code cells, so we don't want to narrow everything. The solution here is to give a prompt area to the heading/md cells to narrow their content area slightly. The only problem is that this makes it more difficult to distinguish between output and md content that follows that output. The solve this, we are adding a narrow line between output and following md.

File last commit:

r13278:0ab30694
r13776:e285883b
Show More
merge_cells.js
37 lines | 1.2 KiB | application/javascript | JavascriptLexer
//
// Test merging two notebook cells.
//
casper.notebook_test(function() {
var output = this.evaluate(function () {
// Fill in test data.
var set_cell_text = function () {
var cell_one = IPython.notebook.get_selected_cell();
cell_one.set_text('a = 5');
IPython.notebook.insert_cell_below('code');
var cell_two = IPython.notebook.get_selected_cell();
cell_two.set_text('print(a)');
};
// merge_cell_above()
set_cell_text();
IPython.notebook.merge_cell_above();
var merged_above = IPython.notebook.get_selected_cell();
// merge_cell_below()
set_cell_text();
IPython.notebook.select(0);
IPython.notebook.merge_cell_below();
var merged_below = IPython.notebook.get_selected_cell();
return {
above: merged_above.get_text(),
below: merged_below.get_text()
};
});
this.test.assertEquals(output.above, 'a = 5\nprint(a)',
'Successful insert_cell_above().');
this.test.assertEquals(output.below, 'a = 5\nprint(a)',
'Successful insert_cell_below().');
});