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