From 1e41546e51cbb11540af09a814c05c80ed172b30 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Mon, 20 Jun 2022 17:49:56 +0100 Subject: [PATCH] Updated code editor language lists To align and update supported languages. Related to #3511 and #3494 --- resources/js/code.mjs | 16 ++++++++++------ .../views/pages/parts/code-editor.blade.php | 8 ++++++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/resources/js/code.mjs b/resources/js/code.mjs index 0b8190379..5d4186dd0 100644 --- a/resources/js/code.mjs +++ b/resources/js/code.mjs @@ -50,16 +50,18 @@ const modeMap = { diff: 'diff', for: 'fortran', fortran: 'fortran', + 'f#': 'text/x-fsharp', + fsharp: 'text/x-fsharp', go: 'go', haskell: 'haskell', hs: 'haskell', html: 'htmlmixed', ini: 'properties', - javascript: 'javascript', - json: {name: 'javascript', json: true}, - js: 'javascript', - jl: 'julia', - julia: 'julia', + javascript: 'text/javascript', + json: 'application/json', + js: 'text/javascript', + jl: 'text/x-julia', + julia: 'text/x-julia', latex: 'text/x-stex', lua: 'lua', md: 'markdown', @@ -71,7 +73,7 @@ const modeMap = { pl: 'perl', powershell: 'powershell', properties: 'properties', - ocaml: 'mllike', + ocaml: 'text/x-ocaml', pascal: 'text/x-pascal', pas: 'text/x-pascal', php: (content) => { @@ -88,6 +90,8 @@ const modeMap = { stext: 'text/x-stex', bash: 'shell', toml: 'toml', + ts: 'text/typescript', + typescript: 'text/typescript', sql: 'text/x-sql', vbs: 'vbscript', vbscript: 'vbscript', diff --git a/resources/views/pages/parts/code-editor.blade.php b/resources/views/pages/parts/code-editor.blade.php index 2224209b1..7c3a7b9ec 100644 --- a/resources/views/pages/parts/code-editor.blade.php +++ b/resources/views/pages/parts/code-editor.blade.php @@ -23,25 +23,33 @@ + + + + + + + +