diff --git a/Parsedown.php b/Parsedown.php index 6e763a9..2ad408a 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -891,6 +891,12 @@ class Parsedown $offset = strlen($matches[0]); } + elseif (strpos($text, '@') > 1 and preg_match('/<(\S+?@\S+?)>/', $text, $matches)) + { + $markup .= ''.$matches[1].''; + + $offset = strlen($matches[0]); + } elseif (preg_match('/^<\/?\w.*?>/', $text, $matches)) { $markup .= $matches[0]; diff --git a/tests/data/email.html b/tests/data/email.html new file mode 100644 index 0000000..c40759c --- /dev/null +++ b/tests/data/email.html @@ -0,0 +1 @@ +

my email is me@example.com

\ No newline at end of file diff --git a/tests/data/email.md b/tests/data/email.md new file mode 100644 index 0000000..26b7b6c --- /dev/null +++ b/tests/data/email.md @@ -0,0 +1 @@ +my email is \ No newline at end of file