mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 01:22:44 +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)) {
|
if(start.line === cm.firstLine() || prevLine.match(matcher)) {
|
||||||
const lastLineNo = cm.lastLine();
|
const lastLineNo = cm.lastLine();
|
||||||
let end = start.line, nextLine = cm.getLine(start.line + 1);
|
let end = start.line;
|
||||||
|
|
||||||
while (end < lastLineNo) {
|
while (end < lastLineNo) {
|
||||||
if(nextLine.match(matcher))
|
if(cm.getLine(end + 1).match(matcher))
|
||||||
break;
|
break;
|
||||||
++end;
|
++end;
|
||||||
nextLine = cm.getLine(end + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -24,4 +23,4 @@ module.exports = {
|
|||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user