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

Normalise link reference lookups

Ref: https://github.com/erusev/parsedown/pull/104
This commit is contained in:
Aidan Woods
2019-02-22 16:10:40 +00:00
parent 7f6127f3f8
commit 33522f0aa4
3 changed files with 16 additions and 2 deletions

View File

@@ -79,6 +79,8 @@ final class Link implements Inline
$definition = \strtolower($label);
}
$definition = \preg_replace('/\s++/', ' ', \trim($definition));
$data = $State->get(DefinitionBook::class)->lookup($definition);
if (! isset($data)) {