diff --git a/Parsedown.php b/Parsedown.php index d7b5537..3e25b0d 100644 --- a/Parsedown.php +++ b/Parsedown.php @@ -1217,7 +1217,7 @@ class Parsedown return; } - if (preg_match('/^[(]((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?[)]/', $remainder, $matches)) + if (preg_match('/^[(]\s*+((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?\s*[)]/', $remainder, $matches)) { $Element['attributes']['href'] = $matches[1];