Skip to content

Commit 5b36f6b

Browse files
Merge pull request #13 from hbcarlos/cell_id
Adds id to cells
2 parents d362e52 + 146097d commit 5b36f6b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jupyter_ydoc/ydoc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ def source(self, value):
125125
ycells = []
126126
for cell in nb["cells"]:
127127
cell["source"] = Y.YText(cell["source"])
128+
if "id" not in cell:
129+
cell["id"] = str(uuid4())
128130
if "outputs" in cell:
129131
cell["outputs"] = Y.YArray(cell["outputs"])
130132
ycell = Y.YMap(cell)

0 commit comments

Comments
 (0)