Read a quoted string in DOCTYPE. Does not handle cross-chunk boundaries.
()
| 714 | |
| 715 | /** Read a quoted string in DOCTYPE. Does not handle cross-chunk boundaries. */ |
| 716 | #readDoctypeQuotedString(): string { |
| 717 | const quote = this.#doctypeQuoteChar; |
| 718 | const buffer = this.#buffer; |
| 719 | const bufferLen = buffer.length; |
| 720 | let value = ""; |
| 721 | while ( |
| 722 | this.#bufferIndex < bufferLen && buffer[this.#bufferIndex] !== quote |
| 723 | ) { |
| 724 | value += buffer[this.#bufferIndex]; |
| 725 | this.#advanceWithCode(buffer.charCodeAt(this.#bufferIndex)); |
| 726 | } |
| 727 | if (this.#bufferIndex >= bufferLen) { |
| 728 | this.#error("Unterminated quoted string in DOCTYPE declaration"); |
| 729 | } |
| 730 | this.#advanceWithCode(buffer.charCodeAt(this.#bufferIndex)); |
| 731 | return value; |
| 732 | } |
| 733 | |
| 734 | // ======================================================================== |
| 735 | // DEDICATED CAPTURE METHODS |
no test coverage detected