()
| 66 | } |
| 67 | |
| 68 | formatLines(): string[] { |
| 69 | const lines: string[] = [] |
| 70 | |
| 71 | if (this.#format.level >= this.#format.printHeadersFromLevel) { |
| 72 | lines.push(this.#indent(this.#files.header())) |
| 73 | } |
| 74 | |
| 75 | for (const entry of this.#files.entries()) { |
| 76 | const formatter = new Formatter(entry, { ...this.#format, level: this.#format.level + 1 }) |
| 77 | lines.push(...formatter.formatLines()) |
| 78 | } |
| 79 | |
| 80 | return lines |
| 81 | } |
| 82 | |
| 83 | #indent(line: string): string { |
| 84 | const indent = ' '.repeat(this.#format.indentSize * this.#format.level) |
no test coverage detected