mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
fix [0] reference labels
This commit is contained in:
parent
9fd9262f16
commit
0985c2ef29
@ -1027,7 +1027,7 @@ class Parsedown
|
|||||||
|
|
||||||
if (preg_match('/^\s*\[(.*?)\]/', $remaining_text, $matches))
|
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]);
|
$offset += strlen($matches[0]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user