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