Parsedown::blockReference( $Line )

Description

Source

File: bp-help/vendors/parsedown/Parsedown.php

872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
protected function blockReference($Line)
{
    if (strpos($Line['text'], ']') !== false
        and preg_match('/^\[(.+?)\]:[ ]*+<?(\S+?)>?(?:[ ]+["\'(](.+)["\')])?[ ]*+$/', $Line['text'], $matches)
    ) {
        $id = strtolower($matches[1]);
 
        $Data = array(
            'url' => $matches[2],
            'title' => isset($matches[3]) ? $matches[3] : null,
        );
 
        $this->DefinitionData['Reference'][$id] = $Data;
 
        $Block = array(
            'element' => array(),
        );
 
        return $Block;
    }
}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.