public function parseLink($line)
    {
        // Links
        if (preg_match('/^\.\. _`(.+)`: (.+)$/mUsi', $line, $match)) {
            $this->environment->setLink($match[1], $match[2]);
            return true;
        }

        if (preg_match('/^\.\. _(.+): (.+)$/mUsi', $line, $match)) {
            $this->environment->setLink($match[1], $match[2]);
            return true;
        }

        // Short anonymous links
        if (preg_match('/^__ (.+)$/mUsi', trim($line), $match)) {
            $url = $match[1];
            $this->environment->setLink('_', $url);
            return true;
        }

        // Anchor link 
        if (preg_match('/^\.\. _(.+):$/mUsi', trim($line), $match)) {
            $anchor = $match[1];
            $this->document->addNode($this->kernel->build('Nodes\AnchorNode', $anchor));
            $this->environment->setLink($anchor, '#'.$anchor);
            return true;
        }

        return false;
    }
public function parseLink($line)
    {
        // Links
        if (preg_match('/^\.\. _`(.+)`: (.+)$/mUsi', $line, $match)) {
            $this->environment->setLink($match[1], $match[2]);
            return true;
        }

        if (preg_match('/^\.\. _(.+): (.+)$/mUsi', $line, $match)) {
            $this->environment->setLink($match[1], $match[2]);
            return true;
        }

        // Short anonymous links
        if (preg_match('/^__ (.+)$/mUsi', trim($line), $match)) {
            $url = $match[1];
            $this->environment->setLink('_', $url);
            return true;
        }

        // Anchor link 
        if (preg_match('/^\.\. _(.+):$/mUsi', trim($line), $match)) {
            $anchor = $match[1];
            $this->document->addNode($this->kernel->build('Nodes\AnchorNode', $anchor));
            $this->environment->setLink($anchor, '#'.$anchor);
            return true;
        }

        return false;
    }
public function parseLink ( $ line ) { // Links if ( preg_match ( '/^\.\. _`(.+)`: (.+)$/mUsi' , $ line , $ match ) ) { $ this -> environment -> setLink ( $ match [ 1 ] , $ match [ 2 ] ) ; return true ; } if ( preg_match ( '/^\.\. _(.+): (.+)$/mUsi' , $ line , $ match ) ) { $ this -> environment -> setLink ( $ match [ 1 ] , $ match [ 2 ] ) ; return true ; } // Short anonymous links if ( preg_match ( '/^__ (.+)$/mUsi' , trim ( $ line ) , $ match ) ) { $ url = $ match [ 1 ] ; $ this -> environment -> setLink ( '_' , $ url ) ; return true ; } // Anchor link  if ( preg_match ( '/^\.\. _(.+):$/mUsi' , trim ( $ line ) , $ match ) ) { $ anchor = $ match [ 1 ] ; $ this -> document -> addNode ( $ this -> kernel -> build ( 'Nodes\AnchorNode' , $ anchor ) ) ; $ this -> environment -> setLink ( $ anchor , '#' . $ anchor ) ; return true ; } return false ; }
Try to parse a link definition

@param string $line
@return bool
Try to parse a link definition