mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
cell data: make sure that the cell id (from nbformat 4.5) is kept when saving notebooks
This commit is contained in:
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…
Reference in New Issue
Block a user