()
| 865 | } |
| 866 | |
| 867 | lastLine(): string { |
| 868 | let lineIndex = this.outro.lastIndexOf(n) |
| 869 | if (lineIndex !== -1) |
| 870 | return this.outro.substr(lineIndex + 1) |
| 871 | let lineStr = this.outro |
| 872 | let chunk: Chunk | null = this.lastChunk |
| 873 | while (chunk) { |
| 874 | if (chunk.outro.length > 0) { |
| 875 | lineIndex = chunk.outro.lastIndexOf(n) |
| 876 | if (lineIndex !== -1) |
| 877 | return chunk.outro.substr(lineIndex + 1) + lineStr |
| 878 | lineStr = chunk.outro + lineStr |
| 879 | } |
| 880 | |
| 881 | if (chunk.content.length > 0) { |
| 882 | lineIndex = chunk.content.lastIndexOf(n) |
| 883 | if (lineIndex !== -1) |
| 884 | return chunk.content.substr(lineIndex + 1) + lineStr |
| 885 | lineStr = chunk.content + lineStr |
| 886 | } |
| 887 | |
| 888 | if (chunk.intro.length > 0) { |
| 889 | lineIndex = chunk.intro.lastIndexOf(n) |
| 890 | if (lineIndex !== -1) |
| 891 | return chunk.intro.substr(lineIndex + 1) + lineStr |
| 892 | lineStr = chunk.intro + lineStr |
| 893 | } |
| 894 | chunk = chunk.previous |
| 895 | } |
| 896 | lineIndex = this.intro.lastIndexOf(n) |
| 897 | if (lineIndex !== -1) |
| 898 | return this.intro.substr(lineIndex + 1) + lineStr |
| 899 | return this.intro + lineStr |
| 900 | } |
| 901 | |
| 902 | /** |
| 903 | * Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string. |
nothing calls this directly
no outgoing calls
no test coverage detected