diff --git a/Parsedown.php b/Parsedown.php index 8355d53..7af08c9 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -1008,7 +1008,7 @@ class Parsedown case 'http': - if (preg_match('/^https?:[\/]{2}[^\s]+\b/i', $text, $matches)) + if (preg_match('/^https?:[\/]{2}[^\s]+\b/ui', $text, $matches)) { $element_url = $matches[0]; $element_url = str_replace('&', '&', $element_url); @@ -1069,22 +1069,22 @@ class Parsedown private static $strong_regex = array( '*' => '/^[*]{2}([^*]+?)[*]{2}(?![*])/s', - '_' => '/^__([^_]+?)__(?!_)/s', + '_' => '/^__([^_]+?)__(?!_)/us', ); private static $em_regex = array( '*' => '/^[*]([^*]+?)[*](?![*])/s', - '_' => '/^_([^_]+?)[_](?![_])\b/s', + '_' => '/^_([^_]+?)[_](?![_])\b/us', ); private static $strong_em_regex = array( '*' => '/^[*]{2}(.*?)[*](.+?)[*](.*?)[*]{2}/s', - '_' => '/^__(.*?)_(.+?)_(.*?)__/s', + '_' => '/^__(.*?)_(.+?)_(.*?)__/us', ); private static $em_strong_regex = array( '*' => '/^[*](.*?)[*]{2}(.+?)[*]{2}(.*?)[*]/s', - '_' => '/^_(.*?)__(.+?)__(.*?)_/s', + '_' => '/^_(.*?)__(.+?)__(.*?)_/us', ); private static $special_characters = array( @@ -1102,4 +1102,4 @@ class Parsedown 'span', 'time', ); -} \ No newline at end of file +}