Skip to content

Commit

Permalink
Fixed [#282]
Browse files Browse the repository at this point in the history
  • Loading branch information
thqby committed Feb 11, 2023
1 parent f7e538f commit b03ad4d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server/src/Lexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3426,8 +3426,11 @@ export class Lexer {

function print_indent_string(level: number) {
if (level) {
if (output_lines.length > 1)
level = Math.min(output_lines[output_lines.length - 2].indent + 1, level);
for (let i = output_lines.length - 2; i >= 0; i--)
if (output_lines[i].text.length) {
level = Math.min(output_lines[i].indent + 1, level);
break;
}
line.text.push(indent_string.repeat(line.indent = level));
}
}
Expand Down

0 comments on commit b03ad4d

Please sign in to comment.