in frontend/src/assets/js/lib/ace/mode-idea_log.js [103:139]
this.getCommentRegionBlock = function (session, line, row) {
let startColumn = line.search(this.startRegionRe);
let maxRow = session.getLength();
let startRow = row;
let lineWebserverStopped = /.*web server stopped.*/;
let depth = 1;
while (++row < maxRow) {
line = session.getLine(row);
let lineMatchIdeShutdown = this.lineIdeShutdown.exec(line);
let lineMatchIdeStart = this.startRegionRe.test(line);
//collapse region from IDE STARTED to line before next IDE STARTED
if (lineMatchIdeStart) {
depth--;
row = row - 1
line = session.getLine(row);
}
//collapse region from IDE STARTED to IDE SHUTDOWN
if (lineMatchIdeShutdown && lineMatchIdeShutdown[0]) {
depth--;
//IF webserverstopped is found after IDE SHUTDOWN, collapse region from IDE STARTED to webserverstopped
if (lineWebserverStopped.exec(session.getLine(row + 1))) {
row = row + 1
line = session.getLine(row);
}
}
if (row === maxRow -1 && startColumn !== -1) {
line = session.getLine(row);
depth--;
}
if (!depth) break;
}
let endRow = row;
if (endRow > startRow && depth===0) {
return new Range(startRow, startColumn, endRow, line.length);
}
};