mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Readability
Thanks @PhrozenByte for the suggestion :)
This commit is contained in:
parent
19f1bb9353
commit
6830c3339f
@ -1142,10 +1142,10 @@ class Parsedown
|
||||
|
||||
protected function inlineEmailTag($Excerpt)
|
||||
{
|
||||
$commonMarkEmail = '[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]++@[a-zA-Z0-9]'
|
||||
.'(?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?'
|
||||
.'(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*'
|
||||
;
|
||||
$hostnameLabel = '[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?';
|
||||
|
||||
$commonMarkEmail = '[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]++@'
|
||||
. $hostnameLabel . '(?:\.' . $hostnameLabel . ')*';
|
||||
|
||||
if (strpos($Excerpt['text'], '>') !== false
|
||||
and preg_match("/^<((mailto:)?$commonMarkEmail)>/i", $Excerpt['text'], $matches)
|
||||
|
Loading…
Reference in New Issue
Block a user