cell data: make sure that the cell id (from nbformat 4.5) is kept when saving notebooks

mishaschwartz 5 years ago
parent 16727777f5
commit b070efc32c

@ -490,6 +490,9 @@ define([
var data = {};
// deepcopy the metadata so copied cells don't share the same object
data.metadata = JSON.parse(JSON.stringify(this.metadata));
if (this.id !== undefined) {
data.id = this.id;
}
if (data.metadata.deletable) {
delete data.metadata.deletable;
}
@ -511,6 +514,9 @@ define([
if (data.metadata !== undefined) {
this.metadata = data.metadata;
}
if (data.id !== undefined) {
this.id = data.id;
}
};

Loading…
Cancel
Save