]> BookStack Code Mirror - bookstack/blobdiff - resources/js/code.mjs
Added more complexity in an attempt to make ldap host failover fit
[bookstack] / resources / js / code.mjs
index 5d4186dd0527abaa4257edce8e50312bd4c65c7f..5881e25129be5f874e422c8135dd71cbcbc7f22f 100644 (file)
@@ -15,6 +15,7 @@ import 'codemirror/mode/lua/lua';
 import 'codemirror/mode/markdown/markdown';
 import 'codemirror/mode/mllike/mllike';
 import 'codemirror/mode/nginx/nginx';
+import 'codemirror/mode/octave/octave';
 import 'codemirror/mode/perl/perl';
 import 'codemirror/mode/pascal/pascal';
 import 'codemirror/mode/php/php';
@@ -39,6 +40,7 @@ import 'codemirror/addon/scroll/scrollpastend';
 // Value can be a mode string or a function that will receive the code content & return the mode string.
 // The function option is used in the event the exact mode could be dynamic depending on the code.
 const modeMap = {
+    bash: 'shell',
     css: 'css',
     c: 'text/x-csrc',
     java: 'text/x-java',
@@ -64,11 +66,13 @@ const modeMap = {
     julia: 'text/x-julia',
     latex: 'text/x-stex',
     lua: 'lua',
+    matlab: 'text/x-octave',
     md: 'markdown',
     mdown: 'markdown',
     markdown: 'markdown',
     ml: 'mllike',
     nginx: 'nginx',
+    octave: 'text/x-octave',
     perl: 'perl',
     pl: 'perl',
     powershell: 'powershell',
@@ -88,7 +92,6 @@ const modeMap = {
     shell: 'shell',
     sh: 'shell',
     stext: 'text/x-stex',
-    bash: 'shell',
     toml: 'toml',
     ts: 'text/typescript',
     typescript: 'text/typescript',