We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6ef2e42 + 6aaa4d7 commit f5f2eadCopy full SHA for f5f2ead
notebook/static/notebook/js/notebook.js
@@ -1697,11 +1697,16 @@ define([
1697
if (cell.is_splittable()) {
1698
var texta = cell.get_pre_cursor();
1699
var textb = cell.get_post_cursor();
1700
+ // current cell becomes the second one
1701
+ // so we don't need to worry about selection
1702
cell.set_text(textb);
1703
+ // create new cell with same type
1704
var new_cell = this.insert_cell_above(cell.cell_type);
1705
// Unrender the new cell so we can call set_text.
1706
new_cell.unrender();
1707
new_cell.set_text(texta);
1708
+ // duplicate metadata
1709
+ new_cell.metadata = JSON.parse(JSON.stringify(cell.metadata));
1710
}
1711
};
1712
0 commit comments