| 983 | } |
| 984 | |
| 985 | lastChar(): string { |
| 986 | if (this.outro.length) |
| 987 | return this.outro[this.outro.length - 1] |
| 988 | let chunk: Chunk | null = this.lastChunk |
| 989 | while (chunk) { |
| 990 | if (chunk.outro.length) |
| 991 | return chunk.outro[chunk.outro.length - 1] |
| 992 | if (chunk.content.length) |
| 993 | return chunk.content[chunk.content.length - 1] |
| 994 | if (chunk.intro.length) |
| 995 | return chunk.intro[chunk.intro.length - 1] |
| 996 | chunk = chunk.previous |
| 997 | } |
| 998 | if (this.intro.length) |
| 999 | return this.intro[this.intro.length - 1] |
| 1000 | return '' |
| 1001 | } |
| 1002 | |
| 1003 | lastLine(): string { |
| 1004 | let lineIndex = this.outro.lastIndexOf(n) |