(mode: "quoted" | "plain" | "token")
| 861 | // Preserve "\n" on continuation lines. Inside quotes, `#` is content; inside plain scalars, |
| 862 | // quotes are content. Token mode permits new quoted scalars. |
| 863 | private nextChunk(mode: "quoted" | "plain" | "token"): boolean { |
| 864 | const next = this.nextLine(mode === "quoted") |
| 865 | if (next === undefined) return false |
| 866 | this.offset += this.line.length |
| 867 | this.comment = false |
| 868 | this.line = `\n${mode === "quoted" ? next : this.stripComment(next, mode === "plain")}` |
| 869 | this.index = 0 |
| 870 | return true |
| 871 | } |
| 872 | |
| 873 | // Scan comments with the parser's collection and token context, preserving quoted hashes. |
| 874 | private stripComment(text: string, plain: boolean): string { |
no test coverage detected