mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-07 13:07:22 +08:00
Allow to specify CodeMirror's syntax mode as MIME
This is required for e.g. Scala, where the mode is given as text/x-scala, but the actual implementation is in clike mode. This wouldn't be an issue, but IPython loads modes lazily, so you need both mode name and MIME to resolve correct file and configure CodeMirror.
This commit is contained in:
parent
e07ff73733
commit
3d825cfbcc
@ -1529,7 +1529,7 @@ define([
|
||||
}
|
||||
this.codemirror_mode = newmode;
|
||||
codecell.CodeCell.options_default.cm_config.mode = newmode;
|
||||
modename = newmode.name || newmode
|
||||
modename = newmode.mode || newmode.name || newmode
|
||||
|
||||
that = this;
|
||||
utils.requireCodeMirrorMode(modename, function () {
|
||||
|
Loading…
Reference in New Issue
Block a user