diff --git a/Parsedown.php b/Parsedown.php index 4d09295..413f27c 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -283,7 +283,7 @@ class Parsedown if ($pure_line[0] === '[' and preg_match('/^\[(.+?)\]:[ ]*([^ ]+)/', $pure_line, $matches)) { - $label = $matches[1]; + $label = strtolower($matches[1]); $url = trim($matches[2], '<>'); $this->reference_map[$label] = $url; diff --git a/tests/data/reference_link.html b/tests/data/reference_link.html index 63b3e25..71965ff 100644 --- a/tests/data/reference_link.html +++ b/tests/data/reference_link.html @@ -2,6 +2,7 @@
Here's one on the next line.
Here's one with a different URL.
Here's one with a semantic name.
+Here's one with an upper case label definition.
Here's one with definition name on the next line.
Here's [one][404] with no definition.
Here's an image: