public function renderInlineAsText(array &$tokens, $options, $env)
    {
        $result = '';

        foreach ( $tokens as &$token) {
            if ($token->type === 'text') {
                $result .= $token->content;
            } else if ($token->type === 'image') {
                $result .= $this->renderInlineAsText($token->children, $options, $env);
            }
        }

        return $result;
    }