mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
resolve #82
This commit is contained in:
parent
ebfdace4c6
commit
14ab6d46fe
|
@ -1046,7 +1046,7 @@ class Parsedown
|
||||||
|
|
||||||
case 'http':
|
case 'http':
|
||||||
|
|
||||||
if (preg_match('/^https?:[\/]{2}[^\s]+\b/ui', $text, $matches))
|
if (preg_match('/^https?:[\/]{2}[^\s]+\b\/*/ui', $text, $matches))
|
||||||
{
|
{
|
||||||
$element_url = $matches[0];
|
$element_url = $matches[0];
|
||||||
$element_url = str_replace('&', '&', $element_url);
|
$element_url = str_replace('&', '&', $element_url);
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
<p>an autolink <a href="http://example.com">http://example.com</a></p>
|
<p>an autolink <a href="http://example.com">http://example.com</a></p>
|
||||||
<p>inside of brackets [<a href="http://example.com">http://example.com</a>], inside of braces {<a href="http://example.com">http://example.com</a>}, inside of parentheses (<a href="http://example.com">http://example.com</a>)</p>
|
<p>inside of brackets [<a href="http://example.com">http://example.com</a>], inside of braces {<a href="http://example.com">http://example.com</a>}, inside of parentheses (<a href="http://example.com">http://example.com</a>)</p>
|
||||||
|
<p>trailing slash <a href="http://example.com/">http://example.com/</a> and <a href="http://example.com/path/">http://example.com/path/</a></p>
|
|
@ -1,3 +1,5 @@
|
||||||
an autolink http://example.com
|
an autolink http://example.com
|
||||||
|
|
||||||
inside of brackets [http://example.com], inside of braces {http://example.com}, inside of parentheses (http://example.com)
|
inside of brackets [http://example.com], inside of braces {http://example.com}, inside of parentheses (http://example.com)
|
||||||
|
|
||||||
|
trailing slash http://example.com/ and http://example.com/path/
|
Loading…
Reference in New Issue
Block a user