Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
relax regex and use negative lookbehind to leave mailto: and tel: lin…
Browse files Browse the repository at this point in the history
…ks, fix tests
  • Loading branch information
martinlindhe committed Nov 27, 2015
1 parent 6cb9b20 commit 84fccb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private function adjustString($s)
}

return preg_replace_callback(
'/(<[^>]*>(*SKIP)(*FAIL)|:\w*)/',
'/(?<!mailto|tel):\w*/',
function ($matches) {
return '{' . mb_substr($matches[0], 1) . '}';
},
Expand Down

0 comments on commit 84fccb6

Please sign in to comment.