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

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

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];