| 847 | } |
| 848 | |
| 849 | lastChar(): string { |
| 850 | if (this.outro.length) |
| 851 | return this.outro[this.outro.length - 1] |
| 852 | let chunk: Chunk | null = this.lastChunk |
| 853 | while (chunk) { |
| 854 | if (chunk.outro.length) |
| 855 | return chunk.outro[chunk.outro.length - 1] |
| 856 | if (chunk.content.length) |
| 857 | return chunk.content[chunk.content.length - 1] |
| 858 | if (chunk.intro.length) |
| 859 | return chunk.intro[chunk.intro.length - 1] |
| 860 | chunk = chunk.previous |
| 861 | } |
| 862 | if (this.intro.length) |
| 863 | return this.intro[this.intro.length - 1] |
| 864 | return '' |
| 865 | } |
| 866 | |
| 867 | lastLine(): string { |
| 868 | let lineIndex = this.outro.lastIndexOf(n) |