Skip to content

Commit

Permalink
Trim surrounding whitespace from URL in inlineLink
Browse files Browse the repository at this point in the history
  • Loading branch information
aidantwoods authored Jan 21, 2017
1 parent cc5b38c commit 0172d77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Parsedown.php
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ protected function inlineLink($Excerpt)
return;
}

if (preg_match('/^[(]((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?[)]/', $remainder, $matches))
if (preg_match('/^[(]\s*+((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?\s*[)]/', $remainder, $matches))
{
$Element['attributes']['href'] = $matches[1];

Expand Down

0 comments on commit 0172d77

Please sign in to comment.