(delta)
| 143 | } |
| 144 | |
| 145 | feed(delta) { |
| 146 | if (!delta) return ''; |
| 147 | this.buffer += delta; |
| 148 | const cut = this._safeCutPoint(); |
| 149 | if (cut === 0) return ''; |
| 150 | const safeRegion = this.buffer.slice(0, cut); |
| 151 | this.buffer = this.buffer.slice(cut); |
| 152 | return sanitizeText(safeRegion); |
| 153 | } |
| 154 | |
| 155 | // Largest index into this.buffer such that buffer[0:cut] contains no |
| 156 | // match that could extend past `cut`. Two conditions back off the cut: |
no test coverage detected