mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
resolve #3
This commit is contained in:
parent
17e7e33847
commit
68f2871996
@ -891,6 +891,12 @@ class Parsedown
|
|||||||
|
|
||||||
$offset = strlen($matches[0]);
|
$offset = strlen($matches[0]);
|
||||||
}
|
}
|
||||||
|
elseif (strpos($text, '@') > 1 and preg_match('/<(\S+?@\S+?)>/', $text, $matches))
|
||||||
|
{
|
||||||
|
$markup .= '<a href="mailto:'.$matches[1].'">'.$matches[1].'</a>';
|
||||||
|
|
||||||
|
$offset = strlen($matches[0]);
|
||||||
|
}
|
||||||
elseif (preg_match('/^<\/?\w.*?>/', $text, $matches))
|
elseif (preg_match('/^<\/?\w.*?>/', $text, $matches))
|
||||||
{
|
{
|
||||||
$markup .= $matches[0];
|
$markup .= $matches[0];
|
||||||
|
1
tests/data/email.html
Normal file
1
tests/data/email.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<p>my email is <a href="mailto:me@example.com">me@example.com</a></p>
|
1
tests/data/email.md
Normal file
1
tests/data/email.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
my email is <me@example.com>
|
Loading…
Reference in New Issue
Block a user