1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Merge pull request #69 from KaneCohen/master

This commit is contained in:
Emanuil Rusev 2014-01-29 15:16:00 -08:00
commit 72f4a375ef

View File

@ -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',
);
}
}