ApiGen\Generator\Markups\MarkdownMarkup::block PHP Method

block() public method

public block ( string $text ) : string
$text string
return string
    public function block($text)
    {
        $pattern = '~<(code|pre)>(.+?)</\\1>|```(?:php)?\\s(.+?)\\n```~s';
        $highlighted = preg_replace_callback($pattern, [$this, 'highlightCb'], $text);
        $text = $this->markdown->transform($highlighted);
        return trim($text);
    }