From 5fd1c07c9d8da8b60373463a7b558f8ef4d20490 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Thu, 10 Nov 2022 13:38:56 +0000 Subject: [PATCH] Added dart support to code blocks/editing For #3808 --- resources/js/code.mjs | 2 ++ resources/views/pages/parts/code-editor.blade.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/js/code.mjs b/resources/js/code.mjs index 5881e2512..9ffe76fe6 100644 --- a/resources/js/code.mjs +++ b/resources/js/code.mjs @@ -4,6 +4,7 @@ import Clipboard from "clipboard/dist/clipboard.min"; // Modes import 'codemirror/mode/css/css'; import 'codemirror/mode/clike/clike'; +import 'codemirror/mode/dart/dart'; import 'codemirror/mode/diff/diff'; import 'codemirror/mode/fortran/fortran'; import 'codemirror/mode/go/go'; @@ -49,6 +50,7 @@ const modeMap = { 'c++': 'text/x-c++src', 'c#': 'text/x-csharp', csharp: 'text/x-csharp', + dart: 'application/dart', diff: 'diff', for: 'fortran', fortran: 'fortran', diff --git a/resources/views/pages/parts/code-editor.blade.php b/resources/views/pages/parts/code-editor.blade.php index 770ed4840..a926e5d76 100644 --- a/resources/views/pages/parts/code-editor.blade.php +++ b/resources/views/pages/parts/code-editor.blade.php @@ -23,7 +23,7 @@
@php $languages = [ - 'Bash', 'CSS', 'C', 'C++', 'C#', 'Diff', 'Fortran', 'F#', 'Go', 'Haskell', 'HTML', 'INI', + 'Bash', 'CSS', 'C', 'C++', 'C#', 'Dart', 'Diff', 'Fortran', 'F#', 'Go', 'Haskell', 'HTML', 'INI', 'Java', 'JavaScript', 'JSON', 'Julia', 'Kotlin', 'LaTeX', 'Lua', 'MarkDown', 'MATLAB', 'Nginx', 'OCaml', 'Octave', 'Pascal', 'Perl', 'PHP', 'Powershell', 'Python', 'Ruby', 'Rust', 'Shell', 'SQL', 'TypeScript', 'VBScript', 'VB.NET', 'XML', 'YAML',