1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

add urlsLinked setter

This commit is contained in:
Emanuil Rusev 2015-01-08 16:13:55 +02:00
parent fd0d8125e7
commit dfacf7a71a

View File

@ -75,6 +75,15 @@ class Parsedown
return $this;
}
private $urlsLinked = true;
function setUrlsLinked($urlsLinked)
{
$this->urlsLinked = $urlsLinked;
return $this;
}
#
# Lines
#
@ -1434,6 +1443,11 @@ class Parsedown
protected function unmarkedInlineUrl($text)
{
if ($this->urlsLinked !== true)
{
return $text;
}
$re = '/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui';
$offset = 0;