cebe\markdown\inline\LinkTrait::parseLt PHP Method

parseLt() protected method

Parses inline HTML.
protected parseLt ( $text )
    protected function parseLt($text)
    {
        if (strpos($text, '>') !== false) {
            if (!in_array('parseLink', $this->context)) {
                // do not allow links in links
                if (preg_match('/^<([^\\s]*?@[^\\s]*?\\.\\w+?)>/', $text, $matches)) {
                    // email address
                    return [['email', $this->replaceEscape($matches[1])], strlen($matches[0])];
                } elseif (preg_match('/^<([a-z]{3,}:\\/\\/[^\\s]+?)>/', $text, $matches)) {
                    // URL
                    return [['url', $this->replaceEscape($matches[1])], strlen($matches[0])];
                }
            }
            // try inline HTML if it was neither a URL nor email if HtmlTrait is included.
            if (method_exists($this, 'parseInlineHtml')) {
                return $this->parseInlineHtml($text);
            }
        }
        return [['text', '&lt;'], 1];
    }