Edit File by line
/home/barbar84/www/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode
File: meta.js
// CodeMirror, copyright (c) by Marijn Haverbeke and others
[0] Fix | Delete
// Distributed under an MIT license: http://codemirror.net/LICENSE
[1] Fix | Delete
[2] Fix | Delete
(function(mod) {
[3] Fix | Delete
if (typeof exports == "object" && typeof module == "object") // CommonJS
[4] Fix | Delete
mod(require("../lib/codemirror"));
[5] Fix | Delete
else if (typeof define == "function" && define.amd) // AMD
[6] Fix | Delete
define(["../lib/codemirror"], mod);
[7] Fix | Delete
else // Plain browser env
[8] Fix | Delete
mod(CodeMirror);
[9] Fix | Delete
})(function(CodeMirror) {
[10] Fix | Delete
"use strict";
[11] Fix | Delete
[12] Fix | Delete
CodeMirror.modeInfo = [
[13] Fix | Delete
{name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"]},
[14] Fix | Delete
{name: "PGP", mimes: ["application/pgp", "application/pgp-keys", "application/pgp-signature"], mode: "asciiarmor", ext: ["pgp"]},
[15] Fix | Delete
{name: "ASN.1", mime: "text/x-ttcn-asn", mode: "asn.1", ext: ["asn", "asn1"]},
[16] Fix | Delete
{name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk", file: /^extensions\.conf$/i},
[17] Fix | Delete
{name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"]},
[18] Fix | Delete
{name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h"]},
[19] Fix | Delete
{name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"]},
[20] Fix | Delete
{name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy"]},
[21] Fix | Delete
{name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp"]},
[22] Fix | Delete
{name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj", "cljc", "cljx"]},
[23] Fix | Delete
{name: "ClojureScript", mime: "text/x-clojurescript", mode: "clojure", ext: ["cljs"]},
[24] Fix | Delete
{name: "Closure Stylesheets (GSS)", mime: "text/x-gss", mode: "css", ext: ["gss"]},
[25] Fix | Delete
{name: "CMake", mime: "text/x-cmake", mode: "cmake", ext: ["cmake", "cmake.in"], file: /^CMakeLists.txt$/},
[26] Fix | Delete
{name: "CoffeeScript", mime: "text/x-coffeescript", mode: "coffeescript", ext: ["coffee"], alias: ["coffee", "coffee-script"]},
[27] Fix | Delete
{name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"], alias: ["lisp"]},
[28] Fix | Delete
{name: "Cypher", mime: "application/x-cypher-query", mode: "cypher", ext: ["cyp", "cypher"]},
[29] Fix | Delete
{name: "Cython", mime: "text/x-cython", mode: "python", ext: ["pyx", "pxd", "pxi"]},
[30] Fix | Delete
{name: "Crystal", mime: "text/x-crystal", mode: "crystal", ext: ["cr"]},
[31] Fix | Delete
{name: "CSS", mime: "text/css", mode: "css", ext: ["css"]},
[32] Fix | Delete
{name: "CQL", mime: "text/x-cassandra", mode: "sql", ext: ["cql"]},
[33] Fix | Delete
{name: "D", mime: "text/x-d", mode: "d", ext: ["d"]},
[34] Fix | Delete
{name: "Dart", mimes: ["application/dart", "text/x-dart"], mode: "dart", ext: ["dart"]},
[35] Fix | Delete
{name: "diff", mime: "text/x-diff", mode: "diff", ext: ["diff", "patch"]},
[36] Fix | Delete
{name: "Django", mime: "text/x-django", mode: "django"},
[37] Fix | Delete
{name: "Dockerfile", mime: "text/x-dockerfile", mode: "dockerfile", file: /^Dockerfile$/},
[38] Fix | Delete
{name: "DTD", mime: "application/xml-dtd", mode: "dtd", ext: ["dtd"]},
[39] Fix | Delete
{name: "Dylan", mime: "text/x-dylan", mode: "dylan", ext: ["dylan", "dyl", "intr"]},
[40] Fix | Delete
{name: "EBNF", mime: "text/x-ebnf", mode: "ebnf"},
[41] Fix | Delete
{name: "ECL", mime: "text/x-ecl", mode: "ecl", ext: ["ecl"]},
[42] Fix | Delete
{name: "edn", mime: "application/edn", mode: "clojure", ext: ["edn"]},
[43] Fix | Delete
{name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"]},
[44] Fix | Delete
{name: "Elm", mime: "text/x-elm", mode: "elm", ext: ["elm"]},
[45] Fix | Delete
{name: "Embedded Javascript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"]},
[46] Fix | Delete
{name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"]},
[47] Fix | Delete
{name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"]},
[48] Fix | Delete
{name: "Factor", mime: "text/x-factor", mode: "factor", ext: ["factor"]},
[49] Fix | Delete
{name: "FCL", mime: "text/x-fcl", mode: "fcl"},
[50] Fix | Delete
{name: "Forth", mime: "text/x-forth", mode: "forth", ext: ["forth", "fth", "4th"]},
[51] Fix | Delete
{name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90"]},
[52] Fix | Delete
{name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"]},
[53] Fix | Delete
{name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"]},
[54] Fix | Delete
{name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"]},
[55] Fix | Delete
{name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history).md$/i},
[56] Fix | Delete
{name: "Go", mime: "text/x-go", mode: "go", ext: ["go"]},
[57] Fix | Delete
{name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy", "gradle"]},
[58] Fix | Delete
{name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"]},
[59] Fix | Delete
{name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"]},
[60] Fix | Delete
{name: "Haskell (Literate)", mime: "text/x-literate-haskell", mode: "haskell-literate", ext: ["lhs"]},
[61] Fix | Delete
{name: "Haxe", mime: "text/x-haxe", mode: "haxe", ext: ["hx"]},
[62] Fix | Delete
{name: "HXML", mime: "text/x-hxml", mode: "haxe", ext: ["hxml"]},
[63] Fix | Delete
{name: "ASP.NET", mime: "application/x-aspx", mode: "htmlembedded", ext: ["aspx"], alias: ["asp", "aspx"]},
[64] Fix | Delete
{name: "HTML", mime: "text/html", mode: "htmlmixed", ext: ["html", "htm"], alias: ["xhtml"]},
[65] Fix | Delete
{name: "HTTP", mime: "message/http", mode: "http"},
[66] Fix | Delete
{name: "IDL", mime: "text/x-idl", mode: "idl", ext: ["pro"]},
[67] Fix | Delete
{name: "Pug", mime: "text/x-pug", mode: "pug", ext: ["jade", "pug"], alias: ["jade"]},
[68] Fix | Delete
{name: "Java", mime: "text/x-java", mode: "clike", ext: ["java"]},
[69] Fix | Delete
{name: "Java Server Pages", mime: "application/x-jsp", mode: "htmlembedded", ext: ["jsp"], alias: ["jsp"]},
[70] Fix | Delete
{name: "JavaScript", mimes: ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"],
[71] Fix | Delete
mode: "javascript", ext: ["js"], alias: ["ecmascript", "js", "node"]},
[72] Fix | Delete
{name: "JSON", mimes: ["application/json", "application/x-json"], mode: "javascript", ext: ["json", "map"], alias: ["json5"]},
[73] Fix | Delete
{name: "JSON-LD", mime: "application/ld+json", mode: "javascript", ext: ["jsonld"], alias: ["jsonld"]},
[74] Fix | Delete
{name: "JSX", mime: "text/jsx", mode: "jsx", ext: ["jsx"]},
[75] Fix | Delete
{name: "Jinja2", mime: "null", mode: "jinja2"},
[76] Fix | Delete
{name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"]},
[77] Fix | Delete
{name: "Kotlin", mime: "text/x-kotlin", mode: "clike", ext: ["kt"]},
[78] Fix | Delete
{name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"]},
[79] Fix | Delete
{name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"]},
[80] Fix | Delete
{name: "Lua", mime: "text/x-lua", mode: "lua", ext: ["lua"]},
[81] Fix | Delete
{name: "Markdown", mime: "text/x-markdown", mode: "markdown", ext: ["markdown", "md", "mkd"]},
[82] Fix | Delete
{name: "mIRC", mime: "text/mirc", mode: "mirc"},
[83] Fix | Delete
{name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql"},
[84] Fix | Delete
{name: "Mathematica", mime: "text/x-mathematica", mode: "mathematica", ext: ["m", "nb"]},
[85] Fix | Delete
{name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"]},
[86] Fix | Delete
{name: "MUMPS", mime: "text/x-mumps", mode: "mumps", ext: ["mps"]},
[87] Fix | Delete
{name: "MS SQL", mime: "text/x-mssql", mode: "sql"},
[88] Fix | Delete
{name: "mbox", mime: "application/mbox", mode: "mbox", ext: ["mbox"]},
[89] Fix | Delete
{name: "MySQL", mime: "text/x-mysql", mode: "sql"},
[90] Fix | Delete
{name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\.conf$/i},
[91] Fix | Delete
{name: "NSIS", mime: "text/x-nsis", mode: "nsis", ext: ["nsh", "nsi"]},
[92] Fix | Delete
{name: "NTriples", mime: "text/n-triples", mode: "ntriples", ext: ["nt"]},
[93] Fix | Delete
{name: "Objective C", mime: "text/x-objectivec", mode: "clike", ext: ["m", "mm"], alias: ["objective-c", "objc"]},
[94] Fix | Delete
{name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"]},
[95] Fix | Delete
{name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"]},
[96] Fix | Delete
{name: "Oz", mime: "text/x-oz", mode: "oz", ext: ["oz"]},
[97] Fix | Delete
{name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"]},
[98] Fix | Delete
{name: "PEG.js", mime: "null", mode: "pegjs", ext: ["jsonld"]},
[99] Fix | Delete
{name: "Perl", mime: "text/x-perl", mode: "perl", ext: ["pl", "pm"]},
[100] Fix | Delete
{name: "PHP", mime: "application/x-httpd-php", mode: "php", ext: ["php", "php3", "php4", "php5", "phtml"]},
[101] Fix | Delete
{name: "Pig", mime: "text/x-pig", mode: "pig", ext: ["pig"]},
[102] Fix | Delete
{name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"]},
[103] Fix | Delete
{name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"]},
[104] Fix | Delete
{name: "PowerShell", mime: "application/x-powershell", mode: "powershell", ext: ["ps1", "psd1", "psm1"]},
[105] Fix | Delete
{name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"]},
[106] Fix | Delete
{name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"]},
[107] Fix | Delete
{name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], file: /^(BUCK|BUILD)$/},
[108] Fix | Delete
{name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"]},
[109] Fix | Delete
{name: "Q", mime: "text/x-q", mode: "q", ext: ["q"]},
[110] Fix | Delete
{name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r"], alias: ["rscript"]},
[111] Fix | Delete
{name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"], alias: ["rst"]},
[112] Fix | Delete
{name: "RPM Changes", mime: "text/x-rpm-changes", mode: "rpm"},
[113] Fix | Delete
{name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"]},
[114] Fix | Delete
{name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"], alias: ["jruby", "macruby", "rake", "rb", "rbx"]},
[115] Fix | Delete
{name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"]},
[116] Fix | Delete
{name: "SAS", mime: "text/x-sas", mode: "sas", ext: ["sas"]},
[117] Fix | Delete
{name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"]},
[118] Fix | Delete
{name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"]},
[119] Fix | Delete
{name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"]},
[120] Fix | Delete
{name: "SCSS", mime: "text/x-scss", mode: "css", ext: ["scss"]},
[121] Fix | Delete
{name: "Shell", mime: "text/x-sh", mode: "shell", ext: ["sh", "ksh", "bash"], alias: ["bash", "sh", "zsh"], file: /^PKGBUILD$/},
[122] Fix | Delete
{name: "Sieve", mime: "application/sieve", mode: "sieve", ext: ["siv", "sieve"]},
[123] Fix | Delete
{name: "Slim", mimes: ["text/x-slim", "application/x-slim"], mode: "slim", ext: ["slim"]},
[124] Fix | Delete
{name: "Smalltalk", mime: "text/x-stsrc", mode: "smalltalk", ext: ["st"]},
[125] Fix | Delete
{name: "Smarty", mime: "text/x-smarty", mode: "smarty", ext: ["tpl"]},
[126] Fix | Delete
{name: "Solr", mime: "text/x-solr", mode: "solr"},
[127] Fix | Delete
{name: "Soy", mime: "text/x-soy", mode: "soy", ext: ["soy"], alias: ["closure template"]},
[128] Fix | Delete
{name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"]},
[129] Fix | Delete
{name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"]},
[130] Fix | Delete
{name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]},
[131] Fix | Delete
{name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"]},
[132] Fix | Delete
{name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"]},
[133] Fix | Delete
{name: "sTeX", mime: "text/x-stex", mode: "stex"},
[134] Fix | Delete
{name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx"], alias: ["tex"]},
[135] Fix | Delete
{name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v"]},
[136] Fix | Delete
{name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"]},
[137] Fix | Delete
{name: "Textile", mime: "text/x-textile", mode: "textile", ext: ["textile"]},
[138] Fix | Delete
{name: "TiddlyWiki ", mime: "text/x-tiddlywiki", mode: "tiddlywiki"},
[139] Fix | Delete
{name: "Tiki wiki", mime: "text/tiki", mode: "tiki"},
[140] Fix | Delete
{name: "TOML", mime: "text/x-toml", mode: "toml", ext: ["toml"]},
[141] Fix | Delete
{name: "Tornado", mime: "text/x-tornado", mode: "tornado"},
[142] Fix | Delete
{name: "troff", mime: "text/troff", mode: "troff", ext: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]},
[143] Fix | Delete
{name: "TTCN", mime: "text/x-ttcn", mode: "ttcn", ext: ["ttcn", "ttcn3", "ttcnpp"]},
[144] Fix | Delete
{name: "TTCN_CFG", mime: "text/x-ttcn-cfg", mode: "ttcn-cfg", ext: ["cfg"]},
[145] Fix | Delete
{name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"]},
[146] Fix | Delete
{name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"]},
[147] Fix | Delete
{name: "Twig", mime: "text/x-twig", mode: "twig"},
[148] Fix | Delete
{name: "Web IDL", mime: "text/x-webidl", mode: "webidl", ext: ["webidl"]},
[149] Fix | Delete
{name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"]},
[150] Fix | Delete
{name: "VBScript", mime: "text/vbscript", mode: "vbscript", ext: ["vbs"]},
[151] Fix | Delete
{name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"]},
[152] Fix | Delete
{name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"]},
[153] Fix | Delete
{name: "VHDL", mime: "text/x-vhdl", mode: "vhdl", ext: ["vhd", "vhdl"]},
[154] Fix | Delete
{name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd"], alias: ["rss", "wsdl", "xsd"]},
[155] Fix | Delete
{name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"]},
[156] Fix | Delete
{name: "Yacas", mime: "text/x-yacas", mode: "yacas", ext: ["ys"]},
[157] Fix | Delete
{name: "YAML", mime: "text/x-yaml", mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"]},
[158] Fix | Delete
{name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"]},
[159] Fix | Delete
{name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"]},
[160] Fix | Delete
{name: "xu", mime: "text/x-xu", mode: "mscgen", ext: ["xu"]},
[161] Fix | Delete
{name: "msgenny", mime: "text/x-msgenny", mode: "mscgen", ext: ["msgenny"]}
[162] Fix | Delete
];
[163] Fix | Delete
// Ensure all modes have a mime property for backwards compatibility
[164] Fix | Delete
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
[165] Fix | Delete
var info = CodeMirror.modeInfo[i];
[166] Fix | Delete
if (info.mimes) info.mime = info.mimes[0];
[167] Fix | Delete
}
[168] Fix | Delete
[169] Fix | Delete
CodeMirror.findModeByMIME = function(mime) {
[170] Fix | Delete
mime = mime.toLowerCase();
[171] Fix | Delete
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
[172] Fix | Delete
var info = CodeMirror.modeInfo[i];
[173] Fix | Delete
if (info.mime == mime) return info;
[174] Fix | Delete
if (info.mimes) for (var j = 0; j < info.mimes.length; j++)
[175] Fix | Delete
if (info.mimes[j] == mime) return info;
[176] Fix | Delete
}
[177] Fix | Delete
};
[178] Fix | Delete
[179] Fix | Delete
CodeMirror.findModeByExtension = function(ext) {
[180] Fix | Delete
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
[181] Fix | Delete
var info = CodeMirror.modeInfo[i];
[182] Fix | Delete
if (info.ext) for (var j = 0; j < info.ext.length; j++)
[183] Fix | Delete
if (info.ext[j] == ext) return info;
[184] Fix | Delete
}
[185] Fix | Delete
};
[186] Fix | Delete
[187] Fix | Delete
CodeMirror.findModeByFileName = function(filename) {
[188] Fix | Delete
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
[189] Fix | Delete
var info = CodeMirror.modeInfo[i];
[190] Fix | Delete
if (info.file && info.file.test(filename)) return info;
[191] Fix | Delete
}
[192] Fix | Delete
var dot = filename.lastIndexOf(".");
[193] Fix | Delete
var ext = dot > -1 && filename.substring(dot + 1, filename.length);
[194] Fix | Delete
if (ext) return CodeMirror.findModeByExtension(ext);
[195] Fix | Delete
};
[196] Fix | Delete
[197] Fix | Delete
CodeMirror.findModeByName = function(name) {
[198] Fix | Delete
name = name.toLowerCase();
[199] Fix | Delete
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
[200] Fix | Delete
var info = CodeMirror.modeInfo[i];
[201] Fix | Delete
if (info.name.toLowerCase() == name) return info;
[202] Fix | Delete
if (info.alias) for (var j = 0; j < info.alias.length; j++)
[203] Fix | Delete
if (info.alias[j].toLowerCase() == name) return info;
[204] Fix | Delete
}
[205] Fix | Delete
};
[206] Fix | Delete
});
[207] Fix | Delete
[208] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function