0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-29 20:48:10 +00:00

fold all and unfold all restored

This commit is contained in:
Víctor Losada Hernández
2026-03-29 01:36:37 +01:00
parent 1d02fb9565
commit fb42675574
3 changed files with 24 additions and 14 deletions

View File

@@ -8,7 +8,7 @@ const pageFoldExtension = [
const startLine = doc.lineAt(lineStart);
const prevLineText = startLine.number > 1 ? doc.line(startLine.number - 1).text : '';
if(startLine.number > 1 && !matcher.test(prevLineText)) return null;
if(!matcher.test(prevLineText)) return null;
let endLine = startLine.number;
while (endLine < doc.lines && !matcher.test(doc.line(endLine + 1).text)) {