| 795 | } |
| 796 | |
| 797 | lastChar(): string { |
| 798 | if (this.outro.length) |
| 799 | return this.outro[this.outro.length - 1] |
| 800 | let chunk: Chunk | null = this.lastChunk |
| 801 | while (chunk) { |
| 802 | if (chunk.outro.length) |
| 803 | return chunk.outro[chunk.outro.length - 1] |
| 804 | if (chunk.content.length) |
| 805 | return chunk.content[chunk.content.length - 1] |
| 806 | if (chunk.intro.length) |
| 807 | return chunk.intro[chunk.intro.length - 1] |
| 808 | chunk = chunk.previous |
| 809 | } |
| 810 | if (this.intro.length) |
| 811 | return this.intro[this.intro.length - 1] |
| 812 | return '' |
| 813 | } |
| 814 | |
| 815 | lastLine(): string { |
| 816 | let lineIndex = this.outro.lastIndexOf(n) |