mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 20:42:43 +00:00
More simplification to fold-code script
This commit is contained in:
@@ -6,13 +6,12 @@ module.exports = {
|
||||
|
||||
if(start.line === cm.firstLine() || prevLine.match(matcher)) {
|
||||
const lastLineNo = cm.lastLine();
|
||||
let end = start.line, nextLine = cm.getLine(start.line + 1);
|
||||
let end = start.line;
|
||||
|
||||
while (end < lastLineNo) {
|
||||
if(nextLine.match(matcher))
|
||||
if(cm.getLine(end + 1).match(matcher))
|
||||
break;
|
||||
++end;
|
||||
nextLine = cm.getLine(end + 1);
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -24,4 +23,4 @@ module.exports = {
|
||||
return null;
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user