mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Show an error when opening an old unsupported jupyter format
Fix #136544
This commit is contained in:
@@ -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 : ' ';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user