kopia lustrzana https://github.com/c9/core
detects more syntax modes from shebang
rodzic
32fc12bf92
commit
7daea73876
|
@ -70,7 +70,7 @@
|
|||
"c9.ide.language.javascript.tern": "#0545a6385d",
|
||||
"c9.ide.language.javascript.infer": "#b9c2e4bdb8",
|
||||
"c9.ide.language.jsonalyzer": "#a0549e14ff",
|
||||
"c9.ide.language.codeintel": "#0fe92d6f46",
|
||||
"c9.ide.language.codeintel": "#957b840fff",
|
||||
"c9.ide.collab": "#a414999755",
|
||||
"c9.ide.local": "#9169fec157",
|
||||
"c9.ide.find": "#e632ecf4be",
|
||||
|
@ -95,8 +95,8 @@
|
|||
"c9.ide.imgeditor": "#612e75ef4f",
|
||||
"c9.ide.immediate": "#0b0ee744f9",
|
||||
"c9.ide.installer": "#2921efaf6d",
|
||||
"c9.ide.language.python": "#9fba572b1a",
|
||||
"c9.ide.language.go": "#6ce1c7a7ef",
|
||||
"c9.ide.language.python": "#189b55135d",
|
||||
"c9.ide.language.go": "#c58539fc05",
|
||||
"c9.ide.navigate": "#5d5707058c",
|
||||
"c9.ide.newresource": "#981a408a7b",
|
||||
"c9.ide.openfiles": "#2ae85a9e33",
|
||||
|
|
|
@ -1461,11 +1461,16 @@ define(function(require, exports, module) {
|
|||
return;
|
||||
}
|
||||
else if (/^#!/.test(firstLine)) {
|
||||
var match = firstLine.match(/\b(node|bash|sh)\b/);
|
||||
switch (match && match[1]) {
|
||||
var match = firstLine.match(/\b(bash|ksh|node|perl|sh)\b|\b(php|python|ruby)/);
|
||||
switch (match && (match[1] || match[2])) {
|
||||
case "bash": // fallthrough
|
||||
case "ksh":
|
||||
case "sh": syntax = "sh"; break;
|
||||
case "node": syntax = "javascript"; break;
|
||||
case "sh": // fallthrough
|
||||
case "bash": syntax = "sh"; break;
|
||||
case "perl": syntax = "perl"; break;
|
||||
case "php": syntax = "php"; break;
|
||||
case "python": syntax = "python"; break;
|
||||
case "ruby": syntax = "ruby"; break;
|
||||
default: syntax = ""; break;
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue