You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
147 lines
3.5 KiB
JavaScript
147 lines
3.5 KiB
JavaScript
9 years ago
|
define(function () {
|
||
9 years ago
|
var Modes = {};
|
||
|
|
||
|
// mode language (extension)
|
||
|
var list = Modes.list = [
|
||
|
"apl apl .apl",
|
||
9 years ago
|
"asciiarmor asciiarmor",
|
||
|
"asn.1 asn.1",
|
||
|
"asterisk asterisk",
|
||
9 years ago
|
"brainfuck brainfuck .b",
|
||
9 years ago
|
"clike clike",
|
||
|
"clojure clojure",
|
||
|
"cmake cmake",
|
||
|
"cobol cobol",
|
||
|
"coffeescript coffeescript",
|
||
|
"commonlisp commonlisp",
|
||
|
"crystal crystal",
|
||
9 years ago
|
"css css .css",
|
||
9 years ago
|
"cypher cypher",
|
||
|
"d d",
|
||
|
"dart dart",
|
||
|
"diff diff",
|
||
|
"django django",
|
||
|
"dockerfile dockerfile",
|
||
|
"dtd dtd",
|
||
|
"dylan dylan",
|
||
|
"ebnf ebnf",
|
||
|
"ecl ecl",
|
||
|
"eiffel eiffel",
|
||
9 years ago
|
"elm elm .elm",
|
||
9 years ago
|
"erlang erlang",
|
||
|
"factor factor",
|
||
|
"fcl fcl",
|
||
|
"forth forth",
|
||
|
"fortran fortran",
|
||
|
"gas gas",
|
||
9 years ago
|
"gfm gfm .md",
|
||
9 years ago
|
"gherkin gherkin",
|
||
|
"go go",
|
||
|
"groovy groovy",
|
||
|
"haml haml",
|
||
|
"handlebars handlebars",
|
||
9 years ago
|
"haskell haskell .hs",
|
||
9 years ago
|
"haskell-literate haskell-literate",
|
||
|
"haxe haxe",
|
||
|
"htmlembedded htmlembedded",
|
||
9 years ago
|
"htmlmixed htmlmixed .html",
|
||
9 years ago
|
"http http",
|
||
|
"idl idl",
|
||
|
"index.html index.html",
|
||
|
"jade jade",
|
||
9 years ago
|
"javascript javascript .js",
|
||
9 years ago
|
"jinja2 jinja2",
|
||
9 years ago
|
"jsx jsx .jsx",
|
||
9 years ago
|
"julia julia",
|
||
|
"livescript livescript",
|
||
|
"loadmode.js loadmode.js",
|
||
|
"lua lua",
|
||
9 years ago
|
"markdown markdown .md",
|
||
9 years ago
|
"mathematica mathematica",
|
||
|
"meta.js meta.js",
|
||
|
"mirc mirc",
|
||
|
"mllike mllike",
|
||
|
"modelica modelica",
|
||
|
"mscgen mscgen",
|
||
|
"mumps mumps",
|
||
|
"nginx nginx",
|
||
|
"nsis nsis",
|
||
|
"ntriples ntriples",
|
||
|
"octave octave",
|
||
|
"oz oz",
|
||
|
"pascal pascal",
|
||
|
"pegjs pegjs",
|
||
|
"perl perl",
|
||
|
"php php",
|
||
|
"pig pig",
|
||
|
"properties properties",
|
||
|
"protobuf protobuf",
|
||
|
"puppet puppet",
|
||
9 years ago
|
"python python .py",
|
||
9 years ago
|
"q q",
|
||
|
"r r",
|
||
|
"rpm rpm",
|
||
|
"rst rst",
|
||
|
"ruby ruby",
|
||
|
"rust rust",
|
||
|
"sass sass",
|
||
9 years ago
|
"scheme scheme .scm",
|
||
|
"shell shell .sh",
|
||
9 years ago
|
"sieve sieve",
|
||
|
"slim slim",
|
||
|
"smalltalk smalltalk",
|
||
|
"smarty smarty",
|
||
|
"solr solr",
|
||
|
"soy soy",
|
||
|
"sparql sparql",
|
||
|
"spreadsheet spreadsheet",
|
||
|
"sql sql",
|
||
|
"stex stex",
|
||
|
"stylus stylus",
|
||
|
"swift swift",
|
||
|
"tcl tcl",
|
||
9 years ago
|
"text text .txt",
|
||
9 years ago
|
"textile textile",
|
||
|
"tiddlywiki tiddlywiki",
|
||
|
"tiki tiki",
|
||
|
"toml toml",
|
||
|
"tornado tornado",
|
||
|
"troff troff",
|
||
|
"ttcn ttcn",
|
||
|
"ttcn-cfg ttcn-cfg",
|
||
|
"turtle turtle",
|
||
|
"twig twig",
|
||
|
"vb vb",
|
||
|
"vbscript vbscript",
|
||
|
"velocity velocity",
|
||
|
"verilog verilog",
|
||
|
"vhdl vhdl",
|
||
|
"vue vue",
|
||
|
"xml xml",
|
||
|
//"xwiki xwiki21",
|
||
|
"xquery xquery",
|
||
9 years ago
|
"yaml yaml .yaml",
|
||
9 years ago
|
"yaml-frontmatter yaml-frontmatter",
|
||
|
"z80 z80"
|
||
9 years ago
|
].map(function (line) {
|
||
|
var kv = line.split(/\s/);
|
||
|
return {
|
||
|
language: kv[0].replace(/_/g, ' '),
|
||
9 years ago
|
mode: kv[1],
|
||
|
ext: kv[2],
|
||
9 years ago
|
};
|
||
|
});
|
||
9 years ago
|
|
||
|
var extensionOf = Modes.extensionOf = function (mode) {
|
||
|
var ext = '';
|
||
|
list.some(function (o) {
|
||
|
if (o.mode !== mode) { return; }
|
||
|
ext = o.ext || '';
|
||
|
return true;
|
||
|
});
|
||
|
return ext;
|
||
|
};
|
||
|
|
||
|
return Modes;
|
||
9 years ago
|
});
|