]> BookStack Code Mirror - bookstack/commitdiff
Code Blocks: Added SAS and R language options
authorDan Brown <redacted>
Mon, 30 Sep 2024 15:47:55 +0000 (16:47 +0100)
committerDan Brown <redacted>
Mon, 30 Sep 2024 15:47:55 +0000 (16:47 +0100)
For #5206

resources/js/code/languages.js
resources/js/code/legacy-modes.mjs
resources/views/pages/parts/code-editor.blade.php

index ef317334c2b93d93b23cf63c29093a9104d22a08..da9631a138af11d1b578f5943dc723f9c5bb9a2b 100644 (file)
@@ -71,10 +71,12 @@ const modeMap = {
     ocaml: () => legacyLoad('oCaml'),
     py: () => legacyLoad('python'),
     python: () => legacyLoad('python'),
+    r: () => legacyLoad('r'),
     rb: () => legacyLoad('ruby'),
     rs: () => legacyLoad('rust'),
     ruby: () => legacyLoad('ruby'),
     rust: () => legacyLoad('rust'),
+    sas: () => legacyLoad('sas'),
     scala: () => legacyLoad('scala'),
     scheme: () => legacyLoad('scheme'),
     shell: () => legacyLoad('shell'),
index 55a804bf97e69ef7ba95064fcf432cf4b01f929d..7b70bec10a1c745f08f28dffa9197240d021c0aa 100644 (file)
@@ -16,8 +16,10 @@ export {pascal} from '@codemirror/legacy-modes/mode/pascal';
 export {powerShell} from '@codemirror/legacy-modes/mode/powershell';
 export {properties} from '@codemirror/legacy-modes/mode/properties';
 export {python} from '@codemirror/legacy-modes/mode/python';
+export {r} from '@codemirror/legacy-modes/mode/r';
 export {ruby} from '@codemirror/legacy-modes/mode/ruby';
 export {rust} from '@codemirror/legacy-modes/mode/rust';
+export {sas} from '@codemirror/legacy-modes/mode/sas';
 export {scheme} from '@codemirror/legacy-modes/mode/scheme';
 export {shell} from '@codemirror/legacy-modes/mode/shell';
 export {
index 688fe67ef6722d6c3da0383185d2487656f879f9..fc8852a32b8f6f2805367ec989567e74f36a23c2 100644 (file)
@@ -26,7 +26,7 @@
                                 'Bash', 'CSS', 'C', 'C++', 'C#', 'Clojure', 'Dart', 'Diff', 'Fortran', 'F#', 'Go', 'Haskell', 'HTML', 'INI',
                                 'Java', 'JavaScript', 'JSON', 'Julia', 'Kotlin', 'LaTeX', 'Lua', 'MarkDown', 'MATLAB', 'MSSQL', 'MySQL',
                                 'Nginx', 'OCaml', 'Octave', 'Pascal', 'Perl', 'PHP', 'PL/SQL', 'PostgreSQL', 'Powershell', 'Python',
-                                'Ruby', 'Rust', 'Scala', 'Scheme', 'Shell', 'Smarty', 'SQL', 'SQLite', 'Swift',
+                                'R', 'Ruby', 'Rust', 'SAS', 'Scala', 'Scheme', 'Shell', 'Smarty', 'SQL', 'SQLite', 'Swift',
                                 'Twig', 'TypeScript', 'VBScript', 'VB.NET', 'XML', 'YAML',
                             ];
                         @endphp