1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00
This commit is contained in:
Emanuil Rusev 2014-02-06 00:10:18 +02:00
parent ebfdace4c6
commit 14ab6d46fe
3 changed files with 6 additions and 3 deletions

View File

@ -1046,7 +1046,7 @@ class Parsedown
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 = str_replace('&', '&', $element_url);

View File

@ -1,2 +1,3 @@
<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>

View File

@ -1,3 +1,5 @@
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/