src/AbstractBlock.php
protected function replaceInlineUrls($html)
    {
        return preg_replace_callback('/\<(.*)\>/U', function ($found) {
            if (strpos($found[1], 'http') === 0 || strpos($found[1], 'ftp') === 0) {
                return '<a href="' . $found[1] . '">' . $found[1] . '</a>';
            }

            if (filter_var($found[1], FILTER_VALIDATE_EMAIL)) {
                return '<a href="mailto:' . htmlspecialchars($found[1]) . '">' . $found[1] . '</a>';
            }

            return $found[0];
        }, $html);
    }
protected function replaceInlineUrls($html)
    {
        return preg_replace_callback('/\<(.*)\>/U', function ($found) {
            if (strpos($found[1], 'http') === 0 || strpos($found[1], 'ftp') === 0) {
                return '<a href="' . $found[1] . '">' . $found[1] . '</a>';
            }

            if (filter_var($found[1], FILTER_VALIDATE_EMAIL)) {
                return '<a href="mailto:' . htmlspecialchars($found[1]) . '">' . $found[1] . '</a>';
            }

            return $found[0];
        }, $html);
    }
@param string $html

@return string