Skip to content

Commit

Permalink
Disable backtracking where the regex doesn't need it
Browse files Browse the repository at this point in the history
  • Loading branch information
aidantwoods committed Mar 9, 2018
1 parent 721b885 commit 19f1bb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Parsedown.php
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ protected function inlineCode($Excerpt)

protected function inlineEmailTag($Excerpt)
{
$commonMarkEmail = '[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9]'
$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])?)*'
;
Expand Down

0 comments on commit 19f1bb9

Please sign in to comment.