// make sure to close all remaining indentation scopes
if (previousLevels.size() > 1) {
sb.append('\n');
newlines.push(cursor);
newlines2.push(cursor - indexDelta);
while (previousLevels.size() > 1) {
previousLevels.pop();
sb.append(Chars.DEDENT);
}
}