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
This commit is contained in:
parent
bac7d1c053
commit
5478148f6f
@ -44,19 +44,36 @@ public class ModeInjector {
|
|||||||
Modes.I.clike(),
|
Modes.I.clike(),
|
||||||
Modes.I.clojure(),
|
Modes.I.clojure(),
|
||||||
Modes.I.commonlisp(),
|
Modes.I.commonlisp(),
|
||||||
|
Modes.I.coffeescript(),
|
||||||
Modes.I.css(),
|
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.go(),
|
||||||
Modes.I.groovy(),
|
Modes.I.groovy(),
|
||||||
|
Modes.I.haskell(),
|
||||||
Modes.I.htmlmixed(),
|
Modes.I.htmlmixed(),
|
||||||
Modes.I.javascript(),
|
Modes.I.javascript(),
|
||||||
|
Modes.I.lua(),
|
||||||
|
Modes.I.markdown(),
|
||||||
Modes.I.perl(),
|
Modes.I.perl(),
|
||||||
|
Modes.I.php(),
|
||||||
|
Modes.I.pig(),
|
||||||
Modes.I.properties(),
|
Modes.I.properties(),
|
||||||
Modes.I.python(),
|
Modes.I.python(),
|
||||||
|
Modes.I.r(),
|
||||||
Modes.I.ruby(),
|
Modes.I.ruby(),
|
||||||
|
Modes.I.scheme(),
|
||||||
Modes.I.shell(),
|
Modes.I.shell(),
|
||||||
|
Modes.I.smalltalk(),
|
||||||
Modes.I.sql(),
|
Modes.I.sql(),
|
||||||
Modes.I.velocity(),
|
Modes.I.velocity(),
|
||||||
|
Modes.I.verilog(),
|
||||||
Modes.I.xml(),
|
Modes.I.xml(),
|
||||||
|
Modes.I.yaml(),
|
||||||
};
|
};
|
||||||
|
|
||||||
mimeAlias = new HashMap<>();
|
mimeAlias = new HashMap<>();
|
||||||
|
@ -27,19 +27,37 @@ public interface Modes extends ClientBundle {
|
|||||||
@Source("clike/clike.js") @DoNotEmbed DataResource clike();
|
@Source("clike/clike.js") @DoNotEmbed DataResource clike();
|
||||||
@Source("clojure/clojure.js") @DoNotEmbed DataResource clojure();
|
@Source("clojure/clojure.js") @DoNotEmbed DataResource clojure();
|
||||||
@Source("commonlisp/commonlisp.js") @DoNotEmbed DataResource commonlisp();
|
@Source("commonlisp/commonlisp.js") @DoNotEmbed DataResource commonlisp();
|
||||||
|
@Source("coffeescript/coffeescript.js") @DoNotEmbed DataResource coffeescript();
|
||||||
@Source("css/css.js") @DoNotEmbed DataResource css();
|
@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("go/go.js") @DoNotEmbed DataResource go();
|
||||||
@Source("groovy/groovy.js") @DoNotEmbed DataResource groovy();
|
@Source("groovy/groovy.js") @DoNotEmbed DataResource groovy();
|
||||||
|
@Source("haskell/haskell.js") @DoNotEmbed DataResource haskell();
|
||||||
@Source("htmlmixed/htmlmixed.js") @DoNotEmbed DataResource htmlmixed();
|
@Source("htmlmixed/htmlmixed.js") @DoNotEmbed DataResource htmlmixed();
|
||||||
@Source("javascript/javascript.js") @DoNotEmbed DataResource javascript();
|
@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("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("properties/properties.js") @DoNotEmbed DataResource properties();
|
||||||
@Source("python/python.js") @DoNotEmbed DataResource python();
|
@Source("python/python.js") @DoNotEmbed DataResource python();
|
||||||
|
@Source("r/r.js") @DoNotEmbed DataResource r();
|
||||||
@Source("ruby/ruby.js") @DoNotEmbed DataResource ruby();
|
@Source("ruby/ruby.js") @DoNotEmbed DataResource ruby();
|
||||||
|
@Source("scheme/scheme.js") @DoNotEmbed DataResource scheme();
|
||||||
@Source("shell/shell.js") @DoNotEmbed DataResource shell();
|
@Source("shell/shell.js") @DoNotEmbed DataResource shell();
|
||||||
|
@Source("smalltalk/smalltalk.js") @DoNotEmbed DataResource smalltalk();
|
||||||
@Source("sql/sql.js") @DoNotEmbed DataResource sql();
|
@Source("sql/sql.js") @DoNotEmbed DataResource sql();
|
||||||
|
@Source("tcl/tcl.js") @DoNotEmbed DataResource tcl();
|
||||||
@Source("velocity/velocity.js") @DoNotEmbed DataResource velocity();
|
@Source("velocity/velocity.js") @DoNotEmbed DataResource velocity();
|
||||||
|
@Source("verilog/verilog.js") @DoNotEmbed DataResource verilog();
|
||||||
@Source("xml/xml.js") @DoNotEmbed DataResource xml();
|
@Source("xml/xml.js") @DoNotEmbed DataResource xml();
|
||||||
|
@Source("yaml/yaml.js") @DoNotEmbed DataResource yaml();
|
||||||
|
|
||||||
// When adding a resource, update static initializer in ModeInjector.
|
// When adding a resource, update static initializer in ModeInjector.
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,9 @@ text/x-scala
|
|||||||
clojure:
|
clojure:
|
||||||
text/x-clojure
|
text/x-clojure
|
||||||
|
|
||||||
|
coffeescript:
|
||||||
|
text/x-coffeescript
|
||||||
|
|
||||||
commonlisp:
|
commonlisp:
|
||||||
text/x-common-lisp
|
text/x-common-lisp
|
||||||
|
|
||||||
@ -18,12 +21,33 @@ css:
|
|||||||
text/css
|
text/css
|
||||||
text/x-scss
|
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:
|
go:
|
||||||
text/x-go
|
text/x-go
|
||||||
|
|
||||||
groovy:
|
groovy:
|
||||||
text/x-groovy
|
text/x-groovy
|
||||||
|
|
||||||
|
haskell:
|
||||||
|
text/x-haskell
|
||||||
|
|
||||||
htmlmixed:
|
htmlmixed:
|
||||||
text/html
|
text/html
|
||||||
|
|
||||||
@ -37,6 +61,12 @@ application/x-json
|
|||||||
text/typescript
|
text/typescript
|
||||||
application/typescript
|
application/typescript
|
||||||
|
|
||||||
|
lua:
|
||||||
|
text/x-lua
|
||||||
|
|
||||||
|
markdown:
|
||||||
|
text/x-markdown
|
||||||
|
|
||||||
perl:
|
perl:
|
||||||
text/x-perl
|
text/x-perl
|
||||||
|
|
||||||
@ -47,30 +77,58 @@ text/x-properties
|
|||||||
perl:
|
perl:
|
||||||
text/x-perl
|
text/x-perl
|
||||||
|
|
||||||
|
php:
|
||||||
|
application/x-httpd-php
|
||||||
|
application/x-httpd-php-open
|
||||||
|
text/x-php
|
||||||
|
|
||||||
|
pig:
|
||||||
|
text/x-pig
|
||||||
|
|
||||||
python:
|
python:
|
||||||
text/x-python
|
text/x-python
|
||||||
|
|
||||||
|
r:
|
||||||
|
text/r-src
|
||||||
|
|
||||||
ruby:
|
ruby:
|
||||||
text/x-ruby
|
text/x-ruby
|
||||||
|
|
||||||
|
scheme:
|
||||||
|
text/x-scheme
|
||||||
|
|
||||||
shell:
|
shell:
|
||||||
text/x-sh
|
text/x-sh
|
||||||
application/x-shellscript
|
application/x-shellscript
|
||||||
|
|
||||||
|
smalltalk:
|
||||||
|
text/x-stsrc
|
||||||
|
|
||||||
sql:
|
sql:
|
||||||
text/x-sql
|
text/x-sql
|
||||||
text/x-mariadb
|
text/x-mariadb
|
||||||
text/x-mysql
|
text/x-mysql
|
||||||
text/x-plsql
|
text/x-plsql
|
||||||
|
|
||||||
|
tcl:
|
||||||
|
text/x-tcl
|
||||||
|
|
||||||
velocity:
|
velocity:
|
||||||
text/velocity
|
text/velocity
|
||||||
|
|
||||||
|
verilog:
|
||||||
|
text/x-verilog
|
||||||
|
|
||||||
xml:
|
xml:
|
||||||
text/xml
|
text/xml
|
||||||
application/xml
|
application/xml
|
||||||
|
|
||||||
|
yaml:
|
||||||
|
text/x-yaml
|
||||||
|
|
||||||
application/x-javascript = application/javascript
|
application/x-javascript = application/javascript
|
||||||
application/x-shellscript = text/x-sh
|
application/x-shellscript = text/x-sh
|
||||||
|
application/x-tcl = text/x-tcl
|
||||||
text/x-h = text/x-c++hdr
|
text/x-h = text/x-c++hdr
|
||||||
text/x-java-source = text/x-java
|
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
|
bucklet = text/x-python
|
||||||
BUCK = text/x-python
|
BUCK = text/x-python
|
||||||
clj = text/x-clojure
|
clj = text/x-clojure
|
||||||
cl = text/x-common-lisp
|
cl = text/x-common-lisp
|
||||||
|
coffee = text/x-coffeescript
|
||||||
cxx = text/x-c++src
|
cxx = text/x-c++src
|
||||||
|
d = text/x-d
|
||||||
defs = text/x-python
|
defs = text/x-python
|
||||||
|
diff = text/x-diff
|
||||||
|
dtd = application/xml-dtd
|
||||||
el = text/x-common-lisp
|
el = text/x-common-lisp
|
||||||
|
erl = text/x-erlang
|
||||||
gitmodules = text/x-ini
|
gitmodules = text/x-ini
|
||||||
go = text/x-go
|
go = text/x-go
|
||||||
groovy = text/x-groovy
|
groovy = text/x-groovy
|
||||||
|
hs = text/x-haskell
|
||||||
hxx = text/x-c++hdr
|
hxx = text/x-c++hdr
|
||||||
lisp = text/x-common-lisp
|
lisp = text/x-common-lisp
|
||||||
lsp = 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
|
pl = text/x-perl
|
||||||
pm = text/x-perl
|
pm = text/x-perl
|
||||||
project.config = text/x-ini
|
project.config = text/x-ini
|
||||||
|
properties = text/x-ini
|
||||||
py = text/x-python
|
py = text/x-python
|
||||||
|
r = text/r-src
|
||||||
rb = text/x-ruby
|
rb = text/x-ruby
|
||||||
scala = text/x-scala
|
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 = [
|
CM3_MODES = [
|
||||||
'clike/clike.js',
|
'clike/clike.js',
|
||||||
'clojure/clojure.js',
|
'clojure/clojure.js',
|
||||||
|
'coffeescript/coffeescript.js',
|
||||||
'commonlisp/commonlisp.js',
|
'commonlisp/commonlisp.js',
|
||||||
'css/css.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',
|
'go/go.js',
|
||||||
'groovy/groovy.js',
|
'groovy/groovy.js',
|
||||||
|
'haskell/haskell.js',
|
||||||
'htmlmixed/htmlmixed.js',
|
'htmlmixed/htmlmixed.js',
|
||||||
'javascript/javascript.js',
|
'javascript/javascript.js',
|
||||||
|
'lua/lua.js',
|
||||||
|
'markdown/markdown.js',
|
||||||
'perl/perl.js',
|
'perl/perl.js',
|
||||||
|
'php/php.js',
|
||||||
|
'pig/pig.js',
|
||||||
'properties/properties.js',
|
'properties/properties.js',
|
||||||
'python/python.js',
|
'python/python.js',
|
||||||
|
'r/r.js',
|
||||||
'ruby/ruby.js',
|
'ruby/ruby.js',
|
||||||
|
'scheme/scheme.js',
|
||||||
'shell/shell.js',
|
'shell/shell.js',
|
||||||
|
'smalltalk/smalltalk.js',
|
||||||
'sql/sql.js',
|
'sql/sql.js',
|
||||||
|
'tcl/tcl.js',
|
||||||
'velocity/velocity.js',
|
'velocity/velocity.js',
|
||||||
|
'verilog/verilog.js',
|
||||||
'xml/xml.js',
|
'xml/xml.js',
|
||||||
|
'yaml/yaml.js',
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user