SideBySide2: Add syntax highlighting for 18 more languages
Include more languages into the CM3 mapping supported by Gerrit:
* coffeescript
* d
* diff
* dtd
* erlang
* gas
* gfm (GitHub Flavored Markdown)
* haskell
* lua
* markdown
* php
* pig
* r
* scheme
* smalltalk
* tcl
* verilog
* yaml
Change-Id: Ie3cc3657183a475fb71a71e0fe35be848deb985f
(cherry picked from commit 5478148f6f
)
This commit is contained in:
parent
6b47596c47
commit
1065a871cc
@ -43,19 +43,36 @@ public class ModeInjector {
|
||||
Modes.I.clike(),
|
||||
Modes.I.clojure(),
|
||||
Modes.I.commonlisp(),
|
||||
Modes.I.coffeescript(),
|
||||
Modes.I.css(),
|
||||
Modes.I.d(),
|
||||
Modes.I.diff(),
|
||||
Modes.I.dtd(),
|
||||
Modes.I.erlang(),
|
||||
Modes.I.gas(),
|
||||
Modes.I.gfm(),
|
||||
Modes.I.go(),
|
||||
Modes.I.groovy(),
|
||||
Modes.I.haskell(),
|
||||
Modes.I.htmlmixed(),
|
||||
Modes.I.javascript(),
|
||||
Modes.I.lua(),
|
||||
Modes.I.markdown(),
|
||||
Modes.I.perl(),
|
||||
Modes.I.php(),
|
||||
Modes.I.pig(),
|
||||
Modes.I.properties(),
|
||||
Modes.I.python(),
|
||||
Modes.I.r(),
|
||||
Modes.I.ruby(),
|
||||
Modes.I.scheme(),
|
||||
Modes.I.shell(),
|
||||
Modes.I.smalltalk(),
|
||||
Modes.I.sql(),
|
||||
Modes.I.velocity(),
|
||||
Modes.I.verilog(),
|
||||
Modes.I.xml(),
|
||||
Modes.I.yaml(),
|
||||
};
|
||||
|
||||
mimeAlias = new HashMap<>();
|
||||
|
@ -27,19 +27,37 @@ public interface Modes extends ClientBundle {
|
||||
@Source("clike/clike.js") @DoNotEmbed DataResource clike();
|
||||
@Source("clojure/clojure.js") @DoNotEmbed DataResource clojure();
|
||||
@Source("commonlisp/commonlisp.js") @DoNotEmbed DataResource commonlisp();
|
||||
@Source("coffeescript/coffeescript.js") @DoNotEmbed DataResource coffeescript();
|
||||
@Source("css/css.js") @DoNotEmbed DataResource css();
|
||||
@Source("d/d.js") @DoNotEmbed DataResource d();
|
||||
@Source("diff/diff.js") @DoNotEmbed DataResource diff();
|
||||
@Source("dtd/dtd.js") @DoNotEmbed DataResource dtd();
|
||||
@Source("erlang/erlang.js") @DoNotEmbed DataResource erlang();
|
||||
@Source("gas/gas.js") @DoNotEmbed DataResource gas();
|
||||
@Source("gfm/gfm.js") @DoNotEmbed DataResource gfm();
|
||||
@Source("go/go.js") @DoNotEmbed DataResource go();
|
||||
@Source("groovy/groovy.js") @DoNotEmbed DataResource groovy();
|
||||
@Source("haskell/haskell.js") @DoNotEmbed DataResource haskell();
|
||||
@Source("htmlmixed/htmlmixed.js") @DoNotEmbed DataResource htmlmixed();
|
||||
@Source("javascript/javascript.js") @DoNotEmbed DataResource javascript();
|
||||
@Source("lua/lua.js") @DoNotEmbed DataResource lua();
|
||||
@Source("markdown/markdown.js") @DoNotEmbed DataResource markdown();
|
||||
@Source("perl/perl.js") @DoNotEmbed DataResource perl();
|
||||
@Source("php/php.js") @DoNotEmbed DataResource php();
|
||||
@Source("pig/pig.js") @DoNotEmbed DataResource pig();
|
||||
@Source("properties/properties.js") @DoNotEmbed DataResource properties();
|
||||
@Source("python/python.js") @DoNotEmbed DataResource python();
|
||||
@Source("r/r.js") @DoNotEmbed DataResource r();
|
||||
@Source("ruby/ruby.js") @DoNotEmbed DataResource ruby();
|
||||
@Source("scheme/scheme.js") @DoNotEmbed DataResource scheme();
|
||||
@Source("shell/shell.js") @DoNotEmbed DataResource shell();
|
||||
@Source("smalltalk/smalltalk.js") @DoNotEmbed DataResource smalltalk();
|
||||
@Source("sql/sql.js") @DoNotEmbed DataResource sql();
|
||||
@Source("tcl/tcl.js") @DoNotEmbed DataResource tcl();
|
||||
@Source("velocity/velocity.js") @DoNotEmbed DataResource velocity();
|
||||
@Source("verilog/verilog.js") @DoNotEmbed DataResource verilog();
|
||||
@Source("xml/xml.js") @DoNotEmbed DataResource xml();
|
||||
@Source("yaml/yaml.js") @DoNotEmbed DataResource yaml();
|
||||
|
||||
// When adding a resource, update static initializer in ModeInjector.
|
||||
}
|
||||
|
@ -11,6 +11,9 @@ text/x-scala
|
||||
clojure:
|
||||
text/x-clojure
|
||||
|
||||
coffeescript:
|
||||
text/x-coffeescript
|
||||
|
||||
commonlisp:
|
||||
text/x-common-lisp
|
||||
|
||||
@ -18,12 +21,33 @@ css:
|
||||
text/css
|
||||
text/x-scss
|
||||
|
||||
d:
|
||||
text/x-d
|
||||
|
||||
diff:
|
||||
text/x-diff
|
||||
|
||||
dtd:
|
||||
application/xml-dtd
|
||||
|
||||
erlang:
|
||||
text/x-erlang
|
||||
|
||||
gas:
|
||||
text/x-gas
|
||||
|
||||
gfm:
|
||||
text/x-github-markdown
|
||||
|
||||
go:
|
||||
text/x-go
|
||||
|
||||
groovy:
|
||||
text/x-groovy
|
||||
|
||||
haskell:
|
||||
text/x-haskell
|
||||
|
||||
htmlmixed:
|
||||
text/html
|
||||
|
||||
@ -37,6 +61,12 @@ application/x-json
|
||||
text/typescript
|
||||
application/typescript
|
||||
|
||||
lua:
|
||||
text/x-lua
|
||||
|
||||
markdown:
|
||||
text/x-markdown
|
||||
|
||||
perl:
|
||||
text/x-perl
|
||||
|
||||
@ -47,30 +77,58 @@ text/x-properties
|
||||
perl:
|
||||
text/x-perl
|
||||
|
||||
php:
|
||||
application/x-httpd-php
|
||||
application/x-httpd-php-open
|
||||
text/x-php
|
||||
|
||||
pig:
|
||||
text/x-pig
|
||||
|
||||
python:
|
||||
text/x-python
|
||||
|
||||
r:
|
||||
text/r-src
|
||||
|
||||
ruby:
|
||||
text/x-ruby
|
||||
|
||||
scheme:
|
||||
text/x-scheme
|
||||
|
||||
shell:
|
||||
text/x-sh
|
||||
application/x-shellscript
|
||||
|
||||
smalltalk:
|
||||
text/x-stsrc
|
||||
|
||||
sql:
|
||||
text/x-sql
|
||||
text/x-mariadb
|
||||
text/x-mysql
|
||||
text/x-plsql
|
||||
|
||||
tcl:
|
||||
text/x-tcl
|
||||
|
||||
velocity:
|
||||
text/velocity
|
||||
|
||||
verilog:
|
||||
text/x-verilog
|
||||
|
||||
xml:
|
||||
text/xml
|
||||
application/xml
|
||||
|
||||
yaml:
|
||||
text/x-yaml
|
||||
|
||||
application/x-javascript = application/javascript
|
||||
application/x-shellscript = text/x-sh
|
||||
application/x-tcl = text/x-tcl
|
||||
text/x-h = text/x-c++hdr
|
||||
text/x-java-source = text/x-java
|
||||
text/x-scripttcl = text/x-tcl
|
||||
|
@ -1,19 +1,38 @@
|
||||
as = text/x-gas
|
||||
bucklet = text/x-python
|
||||
BUCK = text/x-python
|
||||
clj = text/x-clojure
|
||||
cl = text/x-common-lisp
|
||||
coffee = text/x-coffeescript
|
||||
cxx = text/x-c++src
|
||||
d = text/x-d
|
||||
defs = text/x-python
|
||||
diff = text/x-diff
|
||||
dtd = application/xml-dtd
|
||||
el = text/x-common-lisp
|
||||
erl = text/x-erlang
|
||||
gitmodules = text/x-ini
|
||||
go = text/x-go
|
||||
groovy = text/x-groovy
|
||||
hs = text/x-haskell
|
||||
hxx = text/x-c++hdr
|
||||
lisp = text/x-common-lisp
|
||||
lsp = text/x-common-lisp
|
||||
lua = text/x-lua
|
||||
md = text/x-markdown
|
||||
patch = text/x-diff
|
||||
php = text/x-php
|
||||
pig = text/x-pig
|
||||
pl = text/x-perl
|
||||
pm = text/x-perl
|
||||
project.config = text/x-ini
|
||||
properties = text/x-ini
|
||||
py = text/x-python
|
||||
r = text/r-src
|
||||
rb = text/x-ruby
|
||||
scala = text/x-scala
|
||||
st = text/x-stsrc
|
||||
v = text/x-verilog
|
||||
vh = text/x-verilog
|
||||
vm = text/velocity
|
||||
yaml = text/x-yaml
|
||||
|
@ -25,18 +25,36 @@ CM3_JS = [
|
||||
CM3_MODES = [
|
||||
'clike/clike.js',
|
||||
'clojure/clojure.js',
|
||||
'coffeescript/coffeescript.js',
|
||||
'commonlisp/commonlisp.js',
|
||||
'css/css.js',
|
||||
'd/d.js',
|
||||
'diff/diff.js',
|
||||
'dtd/dtd.js',
|
||||
'erlang/erlang.js',
|
||||
'gas/gas.js',
|
||||
'gfm/gfm.js',
|
||||
'go/go.js',
|
||||
'groovy/groovy.js',
|
||||
'haskell/haskell.js',
|
||||
'htmlmixed/htmlmixed.js',
|
||||
'javascript/javascript.js',
|
||||
'lua/lua.js',
|
||||
'markdown/markdown.js',
|
||||
'perl/perl.js',
|
||||
'php/php.js',
|
||||
'pig/pig.js',
|
||||
'properties/properties.js',
|
||||
'python/python.js',
|
||||
'r/r.js',
|
||||
'ruby/ruby.js',
|
||||
'scheme/scheme.js',
|
||||
'shell/shell.js',
|
||||
'smalltalk/smalltalk.js',
|
||||
'sql/sql.js',
|
||||
'tcl/tcl.js',
|
||||
'velocity/velocity.js',
|
||||
'verilog/verilog.js',
|
||||
'xml/xml.js',
|
||||
'yaml/yaml.js',
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user