|
30 | 30 | cMdiff.setOption("mode",mode); |
31 | 31 | } |
32 | 32 | } else if (cM && fileName) { |
33 | | - fileExt = fileName.split("."); |
34 | | - fileExt = fileExt[fileExt.length-1]; |
35 | | - var mode = |
36 | | - fileExt == "js" || fileExt == "json" ? "text/javascript" |
37 | | - : fileExt == "coffee" ? "text/x-coffeescript" |
38 | | - : fileExt == "rb" ? "text/x-ruby" |
39 | | - : fileExt == "py" ? "text/x-python" |
40 | | - : fileExt == "css" ? "text/css" |
41 | | - : fileExt == "less" ? "text/x-less" |
42 | | - : fileExt == "md" ? "text/x-markdown" |
43 | | - : fileExt == "xml" ? "application/xml" |
44 | | - : fileExt == "sql" ? "text/x-mysql" // also text/x-sql, text/x-mariadb, text/x-cassandra or text/x-plsql |
45 | | - : fileExt == "erl" ? "text/x-erlang" |
46 | | - : fileExt == "yaml" ? "text/x-yaml" |
47 | | - : fileExt == "java" ? "text/x-java" |
48 | | - : fileExt == "jl" ? "text/x-julia" |
49 | | - : fileExt == "c" ? "text/x-csrc" |
50 | | - : fileExt == "cpp" ? "text/x-c++src" |
51 | | - : fileExt == "ino" ? "text/x-c++src" |
52 | | - : fileExt == "cs" ? "text/x-csharp" |
53 | | - : fileExt == "go" ? "text/x-go" |
54 | | - : fileExt == "lua" ? "text/x-lua" |
55 | | - : fileExt == "pl" ? "text/x-perl" |
56 | | - : fileExt == "scss" ? "text/x-sass" |
57 | | - : "application/x-httpd-php"; |
| 33 | + <?php include(dirname(__FILE__)."/../lib/language-modes-partial.js");?> |
58 | 34 |
|
59 | 35 | if (mode != cM.getOption("mode")) { |
60 | 36 | cM.setOption("mode",mode); |
|
0 commit comments