]> BookStack Code Mirror - bookstack/commitdiff
Codemirror mode now correct for c-like langs
authorDan Brown <redacted>
Sun, 20 May 2018 08:32:15 +0000 (09:32 +0100)
committerDan Brown <redacted>
Sun, 20 May 2018 08:32:15 +0000 (09:32 +0100)
Fixes #849

resources/assets/js/services/code.js

index 8a5a7a022d1b617d14f1106d794eaf8f2d8bfc8a..6c04e98723fadcd8b7a31a075b10ed93de902f04 100644 (file)
@@ -20,13 +20,13 @@ const CodeMirror = require('codemirror');
 
 const modeMap = {
     css: 'css',
-    c: 'clike',
-    java: 'clike',
-    scala: 'clike',
-    kotlin: 'clike',
-    'c++': 'clike',
-    'c#': 'clike',
-    csharp: 'clike',
+    c: 'text/x-csrc',
+    java: 'text/x-java',
+    scala: 'text/x-scala',
+    kotlin: 'text/x-kotlin',
+    'c++': 'text/x-c++src',
+    'c#': 'text/x-csharp',
+    csharp: 'text/x-csharp',
     diff: 'diff',
     go: 'go',
     html: 'htmlmixed',
Morty Proxy This is a proxified and sanitized view of the page, visit original site.