Merge changes Ia78bb6f5,I35c90466 into stable-2.16

* changes:
  Add postgresql/postgres/pgsql to mime list
  Build all languages for highlight.js
This commit is contained in:
David Pursehouse
2019-01-07 14:01:59 +00:00
committed by Gerrit Code Review
4 changed files with 441 additions and 130 deletions

View File

@@ -22,39 +22,8 @@ languages included. Build it with the following:
$> # start in some temp directory
$> git clone https://github.com/highlightjs/highlight.js
$> cd highlight.js
$> node tools/build.js -n \
bash \
cpp \
cs \
clojure \
css \
d \
dart \
erb \
go \
haskell \
java \
javascript \
json \
kotlin \
lisp \
lua \
objectivec \
ocaml \
perl \
php \
protobuf \
puppet \
python \
ruby \
rust \
scala \
shell \
sql \
swift \
typescript \
xml \
yaml
$> npm install
$> node tools/build.js -n
The resulting JS file will appear in the "build" directory of the Highlight.js
repo under the name "highlight.pack.js".

File diff suppressed because one or more lines are too long

View File

@@ -20,7 +20,9 @@
const LANGUAGE_MAP = {
'application/dart': 'dart',
'application/json': 'json',
'application/x-powershell': 'powershell',
'application/typescript': 'typescript',
'application/xquery': 'xquery',
'application/x-erb': 'erb',
'text/css': 'css',
'text/html': 'html',
@@ -29,30 +31,59 @@
'text/x-c': 'cpp',
'text/x-c++src': 'cpp',
'text/x-clojure': 'clojure',
'text/x-cmake': 'cmake',
'text/x-coffeescript': 'coffeescript',
'text/x-common-lisp': 'lisp',
'text/x-crystal': 'crystal',
'text/x-csharp': 'csharp',
'text/x-csrc': 'cpp',
'text/x-d': 'd',
'text/x-diff': 'diff',
'text/x-django': 'django',
'text/x-dockerfile': 'dockerfile',
'text/x-ebnf': 'ebnf',
'text/x-elm': 'elm',
'text/x-erlang': 'erlang',
'text/x-fortran': 'fortran',
'text/x-go': 'go',
'text/x-groovy': 'groovy',
'text/x-haml': 'haml',
'text/x-haskell': 'haskell',
'text/x-haxe': 'haxe',
'text/x-ini': 'ini',
'text/x-java': 'java',
'text/x-julia': 'julia',
'text/x-kotlin': 'kotlin',
'text/x-latex': 'latex',
'text/x-less': 'less',
'text/x-lua': 'lua',
'text/x-mathematica': 'mathematica',
'text/x-nginx-conf': 'nginx',
'text/x-nsis': 'nsis',
'text/x-objectivec': 'objectivec',
'text/x-ocaml': 'ocaml',
'text/x-perl': 'perl',
'text/x-pgsql': 'pgsql', // postgresql
'text/x-php': 'php',
'text/x-protobuf': 'protobuf',
'text/x-puppet': 'puppet',
'text/x-python': 'python',
'text/x-q': 'q',
'text/x-ruby': 'ruby',
'text/x-rustsrc': 'rust',
'text/x-scala': 'scala',
'text/x-scss': 'scss',
'text/x-scheme': 'scheme',
'text/x-shell': 'shell',
'text/x-spreadsheet': 'excel',
'text/x-sh': 'bash',
'text/x-sql': 'sql',
'text/x-swift': 'swift',
'text/x-tcl': 'tcl',
'text/x-twig': 'twig',
'text/x-vb': 'vb',
'text/x-yaml': 'yaml',
'text/vbscript': 'vbscript',
};
const ASYNC_DELAY = 10;

View File

@@ -149,6 +149,7 @@ pas = text/x-pascal
patch = text/x-diff
pcss = text/x-pcss
pgp = application/pgp
pgsql = text/x-pgsql
php = text/x-php
php3 = text/x-php
php4 = text/x-php
@@ -159,6 +160,8 @@ pig = text/x-pig
pl = text/x-perl
pls = text/x-plsql
pm = text/x-perl
postgres = text/x-pgsql
postgresql = text/x-pgsql
pp = text/x-puppet
pro = text/x-idl
properties = text/x-ini