mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix syntax highlight switch
This commit is contained in:
parent
27f12a0186
commit
403cf02ea7
@ -149,14 +149,11 @@ const noteEditor = (function() {
|
||||
codeEditor.setValue(currentNote.detail.note_text);
|
||||
|
||||
const info = CodeMirror.findModeByMIME(currentNote.detail.mime);
|
||||
let mode = null;
|
||||
|
||||
if (info) {
|
||||
mode = info.mode;
|
||||
codeEditor.setOption("mode", info.mime);
|
||||
CodeMirror.autoLoadMode(codeEditor, info.mode);
|
||||
}
|
||||
|
||||
CodeMirror.autoLoadMode(codeEditor, mode);
|
||||
|
||||
codeEditor.setOption("mode", mode);
|
||||
}
|
||||
else {
|
||||
throwError("Unrecognized type " + currentNote.detail.type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user