Contents

Parsedown::inlineUrlTag( $Excerpt )

Description

Source

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

    protected function inlineUrlTag($Excerpt)
    {
        if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<(\w++:\/{2}[^ >]++)>/i', $Excerpt['text'], $matches))
        {
            $url = $matches[1];

            return array(
                'extent' => strlen($matches[0]),
                'element' => array(
                    'name' => 'a',
                    'text' => $url,
                    'attributes' => array(
                        'href' => $url,
                    ),
                ),
            );
        }
    }

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.