]> BookStack Code Mirror - bookstack/blobdiff - resources/js/code.mjs
Added examples, updated docs for image gallery api endpoints
[bookstack] / resources / js / code.mjs
index ad282f2be10b2192ba1c497b5ce2c5aeb67a0a70..9adc23b1f68f5d15aa3100ad819489cb3aef17da 100644 (file)
@@ -25,11 +25,14 @@ import 'codemirror/mode/properties/properties';
 import 'codemirror/mode/python/python';
 import 'codemirror/mode/ruby/ruby';
 import 'codemirror/mode/rust/rust';
+import 'codemirror/mode/scheme/scheme';
 import 'codemirror/mode/shell/shell';
+import 'codemirror/mode/smarty/smarty';
 import 'codemirror/mode/sql/sql';
 import 'codemirror/mode/stex/stex';
 import 'codemirror/mode/swift/swift';
 import 'codemirror/mode/toml/toml';
+import 'codemirror/mode/twig/twig';
 import 'codemirror/mode/vb/vb';
 import 'codemirror/mode/vbscript/vbscript';
 import 'codemirror/mode/xml/xml';
@@ -74,6 +77,8 @@ const modeMap = {
     mdown: 'markdown',
     markdown: 'markdown',
     ml: 'mllike',
+    mssql: 'text/x-mssql',
+    mysql: 'text/x-mysql',
     nginx: 'nginx',
     octave: 'text/x-octave',
     perl: 'perl',
@@ -86,19 +91,26 @@ const modeMap = {
     php: (content) => {
         return content.includes('<?php') ? 'php' : 'text/x-php';
     },
+    pgsql: 'text/x-pgsql',
+    'pl/sql': 'text/x-plsql',
+    postgresql: 'text/x-pgsql',
     py: 'python',
     python: 'python',
     ruby: 'ruby',
     rust: 'rust',
     rb: 'ruby',
     rs: 'rust',
+    scheme: 'scheme',
     shell: 'shell',
     sh: 'shell',
+    smarty: 'smarty',
     sql: 'text/x-sql',
+    sqlite: 'text/x-sqlite',
     stext: 'text/x-stex',
     swift: 'text/x-swift',
     toml: 'toml',
     ts: 'text/typescript',
+    twig: 'twig',
     typescript: 'text/typescript',
     vbs: 'vbscript',
     vbscript: 'vbscript',