mirror of
https://github.com/erusev/parsedown.git
synced 2024-09-20 03:51:29 +02:00
Trim surrounding whitespace from URL in inlineLink
Fixes https://github.com/erusev/parsedown-extra/issues/103
This commit is contained in:
parent
cc5b38ca39
commit
0172d779d7
@ -1217,7 +1217,7 @@ class Parsedown
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preg_match('/^[(]((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?[)]/', $remainder, $matches))
|
if (preg_match('/^[(]\s*+((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?\s*[)]/', $remainder, $matches))
|
||||||
{
|
{
|
||||||
$Element['attributes']['href'] = $matches[1];
|
$Element['attributes']['href'] = $matches[1];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user