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:
parent
fd0d8125e7
commit
dfacf7a71a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user