0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

More simplification to fold-code script

This commit is contained in:
Trevor Buckner
2021-11-13 20:57:33 -05:00
parent 2d30ac21a7
commit b67dc1621b

View File

@@ -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;
});
}
};
};