Added swift support to code blocks and editor

Closes #3847
This commit is contained in:
Dan Brown 2022-11-12 08:44:25 +00:00
parent d2260b234c
commit 2fa5c2581c
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
2 changed files with 5 additions and 3 deletions

View file

@ -28,6 +28,7 @@ import 'codemirror/mode/rust/rust';
import 'codemirror/mode/shell/shell';
import 'codemirror/mode/sql/sql';
import 'codemirror/mode/stex/stex';
import 'codemirror/mode/swift/swift';
import 'codemirror/mode/toml/toml';
import 'codemirror/mode/vb/vb';
import 'codemirror/mode/vbscript/vbscript';
@ -93,11 +94,12 @@ const modeMap = {
rs: 'rust',
shell: 'shell',
sh: 'shell',
sql: 'text/x-sql',
stext: 'text/x-stex',
swift: 'text/x-swift',
toml: 'toml',
ts: 'text/typescript',
typescript: 'text/typescript',
sql: 'text/x-sql',
vbs: 'vbscript',
vbscript: 'vbscript',
'vb.net': 'text/x-vb',

View file

@ -25,8 +25,8 @@
$languages = [
'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',
'Octave', 'Pascal', 'Perl', 'PHP', 'Powershell', 'Python', 'Ruby', 'Rust', 'Shell', 'SQL', 'Swift',
'TypeScript', 'VBScript', 'VB.NET', 'XML', 'YAML',
];
@endphp