mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-23 12:49:41 +08:00
only set codemirror mode if it exists
This commit is contained in:
parent
a2f6a8c3bb
commit
97f4913c16
@ -61,9 +61,11 @@ function(
|
||||
var modename = cfg.file_extension_modes[that._get_file_extension()];
|
||||
if (modename) {
|
||||
var modeinfo = CodeMirror.findModeByName(modename);
|
||||
if (modeinfo) {
|
||||
that.set_codemirror_mode(modeinfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
that._clean_state();
|
||||
});
|
||||
this.clean_sel = $('<div/>');
|
||||
|
Loading…
Reference in New Issue
Block a user