src/MarkdownIt/Renderer.php
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;
    }
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;
    }
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 ; }
internal
Special kludge for image `alt` attributes to conform CommonMark spec.
Don't try to use it! Spec requires to show `alt` content with stripped markup,
instead of simple escaping.
@param Token[]  $tokens    list on block tokens to renter
@param object   $options   params of parser instance
@param object   $env       additional data from parsed input (references, for example)
@return string
internal Special kludge for image alt attributes to conform CommonMark spec . Don t try to use it! Spec requires to show alt content with stripped markup instead of simple escaping .