Merge pull request #465 from aidantwoods/patch-8

Trim surrounding whitespace from URL in inlineLink
This commit is contained in:
Emanuil Rusev 2017-01-23 09:45:19 +02:00 committed by GitHub
commit 4b6493999a
1 changed files with 1 additions and 1 deletions

View File

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