_MarkdownExtra_TmpImpl::_doAnchors_inline_callback PHP Method

_doAnchors_inline_callback() protected method

protected _doAnchors_inline_callback ( $matches )
    protected function _doAnchors_inline_callback($matches)
    {
        $whole_match = $matches[1];
        $link_text = $this->runSpanGamut($matches[2]);
        $url = $matches[3] == '' ? $matches[4] : $matches[3];
        $title =& $matches[7];
        $attr = $this->doExtraAttributes("a", $dummy =& $matches[8]);
        // if the URL was of the form <s p a c e s> it got caught by the HTML
        // tag parser and hashed. Need to reverse the process before using the URL.
        $unhashed = $this->unhash($url);
        if ($unhashed != $url) {
            $url = preg_replace('/^<(.*)>$/', '\\1', $unhashed);
        }
        $url = $this->encodeURLAttribute($url);
        $result = "<a href=\"{$url}\"";
        if (isset($title)) {
            $title = $this->encodeAttribute($title);
            $result .= " title=\"{$title}\"";
        }
        $result .= $attr;
        $link_text = $this->runSpanGamut($link_text);
        $result .= ">{$link_text}</a>";
        return $this->hashPart($result);
    }