]> BookStack Code Mirror - bookstack/blobdiff - resources/assets/js/services/code.js
Added support for Pascal language
[bookstack] / resources / assets / js / services / code.js
index bd749033d60b7702e6d3c0130842ad4b13496693..fe8da77739e752f03f283bf42b49ec0bb25dc03c 100644 (file)
@@ -8,18 +8,23 @@ import 'codemirror/mode/diff/diff';
 import 'codemirror/mode/go/go';
 import 'codemirror/mode/htmlmixed/htmlmixed';
 import 'codemirror/mode/javascript/javascript';
+import 'codemirror/mode/julia/julia';
 import 'codemirror/mode/lua/lua';
+import 'codemirror/mode/haskell/haskell';
 import 'codemirror/mode/markdown/markdown';
+import 'codemirror/mode/mllike/mllike';
 import 'codemirror/mode/nginx/nginx';
 import 'codemirror/mode/php/php';
 import 'codemirror/mode/powershell/powershell';
 import 'codemirror/mode/python/python';
 import 'codemirror/mode/ruby/ruby';
+import 'codemirror/mode/rust/rust';
 import 'codemirror/mode/shell/shell';
 import 'codemirror/mode/sql/sql';
 import 'codemirror/mode/toml/toml';
 import 'codemirror/mode/xml/xml';
 import 'codemirror/mode/yaml/yaml';
+import 'codemirror/mode/pascal/pascal'
 
 // Addons
 import 'codemirror/addon/scroll/scrollpastend';
@@ -35,21 +40,29 @@ const modeMap = {
     csharp: 'text/x-csharp',
     diff: 'diff',
     go: 'go',
+    haskell: 'haskell',
+    hs: 'haskell',
     html: 'htmlmixed',
     javascript: 'javascript',
     json: {name: 'javascript', json: true},
     js: 'javascript',
+    jl: 'julia',
+    julia: 'julia',
     lua: 'lua',
     md: 'markdown',
     mdown: 'markdown',
     markdown: 'markdown',
+    ml: 'mllike',
     nginx: 'nginx',
     powershell: 'powershell',
+    ocaml: 'mllike',
     php: 'php',
     py: 'python',
     python: 'python',
     ruby: 'ruby',
+    rust: 'rust',
     rb: 'ruby',
+    rs: 'rust',
     shell: 'shell',
     sh: 'shell',
     bash: 'shell',
@@ -58,6 +71,7 @@ const modeMap = {
     xml: 'xml',
     yaml: 'yaml',
     yml: 'yaml',
+    pascal: 'text/x-pascal',
 };
 
 /**
@@ -265,4 +279,4 @@ export default {
     setContent: setContent,
     markdownEditor: markdownEditor,
     getMetaKey: getMetaKey,
-};
\ No newline at end of file
+};