Commit 4403fe4d authored by Emanuil Rusev's avatar Emanuil Rusev
Browse files

labels of reference links should be case insensitive

parent 400c8f7d
......@@ -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;
......@@ -2,6 +2,7 @@
<p>Here's <a href="">one</a> on the next line.</p>
<p>Here's <a href="">one</a> with a different URL.</p>
<p>Here's <a href="">one</a> with a semantic name.</p>
<p>Here's <a href="">one</a> with an upper case label definition.</p>
<p>Here's <a href="">one</a> with definition name on the next line.</p>
<p>Here's [one][404] with no definition.</p>
<p>Here's an image: <img alt="Markdown Logo" src="/md.png"></p>
......@@ -13,6 +13,10 @@ Here's [one][website] with a semantic name.
Here's [one][case] with an upper case label definition.
Here's [one]
[website] with definition name on the next line.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment