mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-15 04:00:34 +08:00
Lowercase file extension before looking it up in CodeMirror
It looks like CodeMirror stores no capitalised extensions: https://github.com/codemirror/CodeMirror/blob/master/mode/meta.js If there ever are any, this would break looking them up. But that seems fairly unlikely. Closes gh-1073
This commit is contained in:
parent
df964650fd
commit
b361d39723
@ -116,7 +116,8 @@ function($,
|
||||
|
||||
if (ext_idx > 0) {
|
||||
// CodeMirror.findModeByExtension wants extension without '.'
|
||||
modeinfo = CodeMirror.findModeByExtension(model.name.slice(ext_idx + 1));
|
||||
modeinfo = CodeMirror.findModeByExtension(
|
||||
model.name.slice(ext_idx + 1).toLowerCase());
|
||||
}
|
||||
}
|
||||
if (modeinfo) {
|
||||
|
Loading…
Reference in New Issue
Block a user