mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-06 00:34:00 +01:00
Determin fold type by { char existence
Don't assume if it's a certain file type it will be folding on braces, instead fold on braces if there's a brace char on that line
This commit is contained in:
@@ -367,7 +367,11 @@ if (action=="load") {
|
||||
top.ICEcoder.nextcMInstance++;
|
||||
top.ICEcoder.openFileMDTs.push('<?php echo $serverType=="Linux" ? filemtime($file) : "1000000"; ?>');
|
||||
for (var i=0; i<cM.lineCount(); i++) {
|
||||
top.ICEcoder.content.contentWindow.CodeMirror.newFoldFunction(top.ICEcoder.content.contentWindow.CodeMirror[["coffee","css","js","less","php","py","rb","ruby"].indexOf('<?php echo pathinfo($file, PATHINFO_EXTENSION);?>') > -1 ? "braceRangeFinder" : "tagRangeFinder"],null,"+","-",true)(cM, i);
|
||||
top.ICEcoder.content.contentWindow.CodeMirror.newFoldFunction(top.ICEcoder.content.contentWindow.CodeMirror[
|
||||
cM.getLine(i).indexOf("{")>-1
|
||||
? "braceRangeFinder"
|
||||
: "tagRangeFinder"
|
||||
],null,"+","-",true)(cM, i);
|
||||
}
|
||||
top.ICEcoder.loadingFile = false;
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user