Skip to content

Commit 25bdd71

Browse files
committed
Add scheme and sql-variant code language options
For #3954 and #3942
1 parent deda331 commit 25bdd71

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

resources/js/code.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import 'codemirror/mode/properties/properties';
2525
import 'codemirror/mode/python/python';
2626
import 'codemirror/mode/ruby/ruby';
2727
import 'codemirror/mode/rust/rust';
28+
import 'codemirror/mode/scheme/scheme';
2829
import 'codemirror/mode/shell/shell';
2930
import 'codemirror/mode/smarty/smarty';
3031
import 'codemirror/mode/sql/sql';
@@ -76,6 +77,8 @@ const modeMap = {
7677
mdown: 'markdown',
7778
markdown: 'markdown',
7879
ml: 'mllike',
80+
mssql: 'text/x-mssql',
81+
mysql: 'text/x-mysql',
7982
nginx: 'nginx',
8083
octave: 'text/x-octave',
8184
perl: 'perl',
@@ -88,16 +91,21 @@ const modeMap = {
8891
php: (content) => {
8992
return content.includes('<?php') ? 'php' : 'text/x-php';
9093
},
94+
pgsql: 'text/x-pgsql',
95+
'pl/sql': 'text/x-plsql',
96+
postgresql: 'text/x-pgsql',
9197
py: 'python',
9298
python: 'python',
9399
ruby: 'ruby',
94100
rust: 'rust',
95101
rb: 'ruby',
96102
rs: 'rust',
103+
scheme: 'scheme',
97104
shell: 'shell',
98105
sh: 'shell',
99106
smarty: 'smarty',
100107
sql: 'text/x-sql',
108+
sqlite: 'text/x-sqlite',
101109
stext: 'text/x-stex',
102110
swift: 'text/x-swift',
103111
toml: 'toml',

resources/views/pages/parts/code-editor.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ class="popup-background code-editor">
2424
@php
2525
$languages = [
2626
'Bash', 'CSS', 'C', 'C++', 'C#', 'Dart', 'Diff', 'Fortran', 'F#', 'Go', 'Haskell', 'HTML', 'INI',
27-
'Java', 'JavaScript', 'JSON', 'Julia', 'Kotlin', 'LaTeX', 'Lua', 'MarkDown', 'MATLAB', 'Nginx', 'OCaml',
28-
'Octave', 'Pascal', 'Perl', 'PHP', 'Powershell', 'Python', 'Ruby', 'Rust', 'Shell', 'Smarty', 'SQL', 'Swift',
29-
'Twig', 'TypeScript', 'VBScript', 'VB.NET', 'XML', 'YAML',
27+
'Java', 'JavaScript', 'JSON', 'Julia', 'Kotlin', 'LaTeX', 'Lua', 'MarkDown', 'MATLAB', 'MSSQL', 'MySQL', 'Nginx', 'OCaml',
28+
'Octave', 'Pascal', 'Perl', 'PHP', 'PL/SQL', 'PostgreSQL', 'Powershell', 'Python', 'Ruby', 'Rust', 'Scheme', 'Shell', 'Smarty',
29+
'SQL', 'SQLite', 'Swift', 'Twig', 'TypeScript', 'VBScript', 'VB.NET', 'XML', 'YAML',
3030
];
3131
@endphp
3232

0 commit comments

Comments
 (0)