1
0
Fork 0
mirror of https://github.com/SunRed/haste-server.git synced 2025-09-05 21:10:16 +02:00

Updated highlightjs to support many more languages (#6)

We updated highlight.min.js library to newer version (v9.12.0 -> 10.2.0) and added support for many languages. Updated extensionMap accordingly and also removed from it some unnecessary aliases, like 'json' since they are already natively supported by highlight.min.js library.
There also a new documentation page under docs/languages.md which lists all supported aliases.
This commit is contained in:
twiclo 2020-09-18 08:19:34 -06:00 committed by GitHub
parent 3d501c980f
commit f8c3a58b3a
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 70 additions and 11 deletions

View file

@ -333,13 +333,11 @@ class haste {
// due to the behavior of lookupTypeByExtension and lookupExtensionByType
// Note: optimized for lookupTypeByExtension
haste.extensionMap = {
rb: 'ruby', py: 'python', pl: 'perl', php: 'php', scala: 'scala', go: 'go',
xml: 'xml', html: 'xml', htm: 'xml', css: 'css', js: 'javascript', vbs: 'vbscript',
lua: 'lua', pas: 'delphi', java: 'java', cpp: 'cpp', cc: 'cpp', m: 'objectivec',
vala: 'vala', sql: 'sql', sm: 'smalltalk', lisp: 'lisp', ini: 'ini',
diff: 'diff', bash: 'bash', sh: 'bash', tex: 'tex', erl: 'erlang', hs: 'haskell',
md: 'markdown', txt: '', coffee: 'coffee', json: 'javascript',
swift: 'swift'
sh: 'bash', clike: 'c-like', coffee: 'coffeescript', cs: 'csharp', dpr: 'delphi',
erl: 'erlang', hs: 'haskell', js: 'javascript', kt: 'kotlin', tex: 'latex',
lsp: 'lisp', mk: 'makefile', md: 'markdown', mm: 'objectivec', phptemp: 'php-template',
pl: 'perl', txt: 'plaintext', py: 'python', pyrepl: 'python-repl', rb: 'ruby', rs: 'rust',
sc: 'scala', sm: 'smalltalk', ts: 'typscript', vbs: 'vbscript', html: 'xml', htm: 'xml',
};
@ -351,7 +349,6 @@ haste.extensionMap = {
///// Tab behavior in the textarea - 2 spaces per tab
$(function(){
$('textarea').keydown(function(evt){

File diff suppressed because one or more lines are too long