From 0985c2ef29bd1c4452458b85b5652c15344b0eb6 Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Sun, 23 Feb 2014 23:43:18 +0200 Subject: [PATCH] fix [0] reference labels --- Parsedown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parsedown.php b/Parsedown.php index a56ae6e..c32bdd4 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -1027,7 +1027,7 @@ class Parsedown if (preg_match('/^\s*\[(.*?)\]/', $remaining_text, $matches)) { - $reference = $matches[1] ? $matches[1] : $element['text']; + $reference = $matches[1] === '' ? $element['text'] : $matches[1]; $offset += strlen($matches[0]); }