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

Merge pull request #312 from garoevans/patch-1

Fix check against $matches
This commit is contained in:
Emanuil Rusev 2015-04-24 08:24:06 +03:00
commit 31c8856f53

View File

@ -1212,7 +1212,7 @@ class Parsedown
{ {
if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches))
{ {
$definition = $matches[1] ? $matches[1] : $Element['text']; $definition = strlen($matches[1]) ? $matches[1] : $Element['text'];
$definition = strtolower($definition); $definition = strtolower($definition);
$extent += strlen($matches[0]); $extent += strlen($matches[0]);