Merge pull request #459 from gene-sis/fix_inlineLink_regex

fix_inlineLink_regex
This commit is contained in:
Emanuil Rusev 2017-01-07 16:51:03 +02:00 committed by GitHub
commit cc5b38ca39
3 changed files with 7 additions and 4 deletions

View File

@ -1204,7 +1204,7 @@ class Parsedown
$remainder = $Excerpt['text'];
if (preg_match('/\[((?:[^][]|(?R))*)\]/', $remainder, $matches))
if (preg_match('/\[((?:[^][]++|(?R))*+)\]/', $remainder, $matches))
{
$Element['text'] = $matches[1];
@ -1217,7 +1217,7 @@ class Parsedown
return;
}
if (preg_match('/^[(]((?:[^ ()]|[(][^ )]+[)])+)(?:[ ]+("[^"]*"|\'[^\']*\'))?[)]/', $remainder, $matches))
if (preg_match('/^[(]((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?[)]/', $remainder, $matches))
{
$Element['attributes']['href'] = $matches[1];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long