Enable syntax highlight for OCaml, Haskell, Rust

This commit is contained in:
Anton Kochkov 2019-03-22 16:42:02 +08:00 committed by GitHub
parent f5fe524e6c
commit 4cbfb2bf13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,13 +8,17 @@ import 'codemirror/mode/diff/diff';
import 'codemirror/mode/go/go'; import 'codemirror/mode/go/go';
import 'codemirror/mode/htmlmixed/htmlmixed'; import 'codemirror/mode/htmlmixed/htmlmixed';
import 'codemirror/mode/javascript/javascript'; import 'codemirror/mode/javascript/javascript';
import 'codemirror/mode/julia/julia';
import 'codemirror/mode/lua/lua'; import 'codemirror/mode/lua/lua';
import 'codemirror/mode/haskell/haskell';
import 'codemirror/mode/markdown/markdown'; import 'codemirror/mode/markdown/markdown';
import 'codemirror/mode/mllike/mllike';
import 'codemirror/mode/nginx/nginx'; import 'codemirror/mode/nginx/nginx';
import 'codemirror/mode/php/php'; import 'codemirror/mode/php/php';
import 'codemirror/mode/powershell/powershell'; import 'codemirror/mode/powershell/powershell';
import 'codemirror/mode/python/python'; import 'codemirror/mode/python/python';
import 'codemirror/mode/ruby/ruby'; import 'codemirror/mode/ruby/ruby';
import 'codemirror/mode/rust/rust';
import 'codemirror/mode/shell/shell'; import 'codemirror/mode/shell/shell';
import 'codemirror/mode/sql/sql'; import 'codemirror/mode/sql/sql';
import 'codemirror/mode/toml/toml'; import 'codemirror/mode/toml/toml';
@ -35,21 +39,29 @@ const modeMap = {
csharp: 'text/x-csharp', csharp: 'text/x-csharp',
diff: 'diff', diff: 'diff',
go: 'go', go: 'go',
haskell: 'haskell',
hs: 'haskell',
html: 'htmlmixed', html: 'htmlmixed',
javascript: 'javascript', javascript: 'javascript',
json: {name: 'javascript', json: true}, json: {name: 'javascript', json: true},
js: 'javascript', js: 'javascript',
jl: 'julia',
julia: 'julia',
lua: 'lua', lua: 'lua',
md: 'markdown', md: 'markdown',
mdown: 'markdown', mdown: 'markdown',
markdown: 'markdown', markdown: 'markdown',
ml: 'mllike',
nginx: 'nginx', nginx: 'nginx',
powershell: 'powershell', powershell: 'powershell',
ocaml: 'mllike',
php: 'php', php: 'php',
py: 'python', py: 'python',
python: 'python', python: 'python',
ruby: 'ruby', ruby: 'ruby',
rust: 'rust',
rb: 'ruby', rb: 'ruby',
rs: 'rust',
shell: 'shell', shell: 'shell',
sh: 'shell', sh: 'shell',
bash: 'shell', bash: 'shell',