mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-06 11:35:24 +08:00
explicitely pass language for old notebook
This commit is contained in:
parent
62bfd92374
commit
2394be85c2
@ -169,8 +169,7 @@ define([
|
|||||||
var that = this;
|
var that = this;
|
||||||
if (typeof selected === 'string') {
|
if (typeof selected === 'string') {
|
||||||
selected = {
|
selected = {
|
||||||
name: selected,
|
name: selected
|
||||||
language: selected
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (this._loaded) {
|
if (this._loaded) {
|
||||||
|
@ -2219,10 +2219,13 @@ define(function (require) {
|
|||||||
} else if (this.metadata.language) {
|
} else if (this.metadata.language) {
|
||||||
// compat with IJulia, IHaskell, and other early kernels
|
// compat with IJulia, IHaskell, and other early kernels
|
||||||
// adopters that where seting a language metadata.
|
// adopters that where seting a language metadata.
|
||||||
this.kernel_selector.set_kernel(this.metadata.language);
|
this.kernel_selector.set_kernel({
|
||||||
|
name: "(No name)",
|
||||||
|
language: this.metadata.language
|
||||||
|
});
|
||||||
// this shoudl be stored in kspec now, delete it.
|
// this shoudl be stored in kspec now, delete it.
|
||||||
// remove once we do not support notebook v3 anymore.
|
// remove once we do not support notebook v3 anymore.
|
||||||
del this.metadata.language;
|
delete this.metadata.language;
|
||||||
} else {
|
} else {
|
||||||
// setting kernel via set_kernel above triggers start_session,
|
// setting kernel via set_kernel above triggers start_session,
|
||||||
// otherwise start a new session with the server's default kernel
|
// otherwise start a new session with the server's default kernel
|
||||||
|
Loading…
Reference in New Issue
Block a user