mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Show an error when opening an old unsupported jupyter format
Fix #136544
This commit is contained in:
parent
69ca0f29fd
commit
29c5f2d394
|
@ -40,6 +40,10 @@ export class NotebookSerializer implements vscode.NotebookSerializer {
|
|||
}
|
||||
}
|
||||
|
||||
if (json.nbformat && json.nbformat < 5) {
|
||||
throw new Error('Only Jupyter notebooks version 4+ are supported');
|
||||
}
|
||||
|
||||
// Then compute indent from the contents (only use first 1K characters as a perf optimization)
|
||||
const indentAmount = contents ? detectIndent(contents.substring(0, 1_000)).indent : ' ';
|
||||
|
||||
|
|
Loading…
Reference in a new issue