Read a quoted string in DOCTYPE. Does not handle cross-chunk boundaries.
()
| 763 | |
| 764 | /** Read a quoted string in DOCTYPE. Does not handle cross-chunk boundaries. */ |
| 765 | #readDoctypeQuotedString(): string { |
| 766 | const quote = this.#doctypeQuoteChar; |
| 767 | const buffer = this.#buffer; |
| 768 | const bufferLen = buffer.length; |
| 769 | let value = ""; |
| 770 | while ( |
| 771 | this.#bufferIndex < bufferLen && buffer[this.#bufferIndex] !== quote |
| 772 | ) { |
| 773 | value += buffer[this.#bufferIndex]; |
| 774 | this.#advanceWithCode(buffer.charCodeAt(this.#bufferIndex)); |
| 775 | } |
| 776 | if (this.#bufferIndex >= bufferLen) { |
| 777 | this.#error("Unterminated quoted string in DOCTYPE declaration"); |
| 778 | } |
| 779 | this.#advanceWithCode(buffer.charCodeAt(this.#bufferIndex)); |
| 780 | return value; |
| 781 | } |
| 782 | |
| 783 | // ======================================================================== |
| 784 | // DEDICATED CAPTURE METHODS |
no test coverage detected