(s: string, i: number)
| 2096 | } |
| 2097 | |
| 2098 | private cdata(s: string, i: number): number { |
| 2099 | const end = s.indexOf("]]>", i + 9) |
| 2100 | if (end === -1) return -1 |
| 2101 | if (this.state !== CONTENT) throw this.syntax("CDATA sections are only allowed inside the root element", i) |
| 2102 | this.addText(i, end + 3 - i) |
| 2103 | this.text += normalizeLines(s.slice(i + 9, end)) |
| 2104 | return end + 3 |
| 2105 | } |
| 2106 | |
| 2107 | private doctypeDeclaration(s: string, i: number): number { |
| 2108 | if (this.state !== PROLOG || this.doctype) { |
no test coverage detected