protected function resetState()
    {
        $this->notConverted = [];
        $this->skipConversion = false;
        $this->buffer = [];
        $this->indent = '';
        $this->stack = [];
        $this->lineBreaks = 0;
        $this->lastClosedTag = '';
        $this->lastWasBlockTag = false;
        $this->footnotes = [];
    }