cleanup() {
        // If we are inside of text or attributes, emit what we already have.
        if (this.running && this.sectionStart !== this.index) {
            if (this.state === State.Text ||
                (this.state === State.InSpecialTag && this.sequenceIndex === 0)) {
                this.cbs.ontext(this.sectionStart, this.index);
                this.sectionStart = this.index;
            }
            else if (this.state === State.InAttributeValueDq ||
                this.state === State.InAttributeValueSq ||
                this.state === State.InAttributeValueNq) {
                this.cbs.onattribdata(this.sectionStart, this.index);
                this.sectionStart = this.index;
            }
        }
    }
/**
     * Remove data that has already been consumed from the buffer.
     */
Remove data that has already been consumed from the buffer.
Remove data that has already been consumed from the buffer .
cleanup() {
        if (this.running && this.sectionStart !== this.index) {
            if (this.state === State.Text ||
                (this.state === State.InSpecialTag && this.sequenceIndex === 0)) {
                this.cbs.ontext(this.sectionStart, this.index);
                this.sectionStart = this.index;
            }
            else if (this.state === State.InAttributeValueDq ||
                this.state === State.InAttributeValueSq ||
                this.state === State.InAttributeValueNq) {
                this.cbs.onattribdata(this.sectionStart, this.index);
                this.sectionStart = this.index;
            }
        }
    }
cleanup ( ) { if ( this . running && this . sectionStart !== this . index ) { if ( this . state === State . Text || ( this . state === State . InSpecialTag && this . sequenceIndex === 0 ) ) { this . cbs . ontext ( this . sectionStart , this . index ) ; this . sectionStart = this . index ; } else if ( this . state === State . InAttributeValueDq || this . state === State . InAttributeValueSq || this . state === State . InAttributeValueNq ) { this . cbs . onattribdata ( this . sectionStart , this . index ) ; this . sectionStart = this . index ; } } }
Remove data that has already been consumed from the buffer.
Remove data that has already been consumed from the buffer .
// If we are inside of text or attributes, emit what we already have.