Minimize the changes to ipynb files when saving#7982
Conversation
| file: string; | ||
| line: number; | ||
| state: CellState; | ||
| type: 'preview' | 'execute'; |
There was a problem hiding this comment.
Got rid of this as we don't use it. It was a hack for a 'preview' mode that never really worked.
| // Source is usually a single string on input. Convert back to an array | ||
| return { | ||
| ...cell, | ||
| source: this.convertSource(cell.source) |
There was a problem hiding this comment.
This should actually be the splitMultilineString function. I'll change.
Codecov Report
@@ Coverage Diff @@
## master #7982 +/- ##
==========================================
- Coverage 59.26% 59.26% -0.01%
==========================================
Files 499 499
Lines 22400 22411 +11
Branches 3593 3597 +4
==========================================
+ Hits 13275 13281 +6
- Misses 8299 8301 +2
- Partials 826 829 +3
Continue to review full report at Codecov.
|
| this.notebookJson = json; | ||
| } | ||
|
|
||
| // Double check json (if we have any) |
There was a problem hiding this comment.
Look like this check should go right after the JSON.parse. I wouldn't think we would want indentAmount and notebookJson set for an invalid file.
There was a problem hiding this comment.
For #7960
Make sure internal structure of an ipynb file is maintained between jupyter and us.