mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Update Parsedown.php
This solves a bug which stops referenced links formatting correctly when a space is inserted before a reference to a link right after a list. This is caused because parsedown think's it's a secondary list rather, so it jumps to the next line. Here is an example: + [Google][2] + [Youtube][1] [1]: http://youtube.com [2]: http://google.com
This commit is contained in:
parent
38300323a6
commit
fdf75e8b5b
@ -182,7 +182,7 @@ class Parsedown
|
||||
|
||||
if (isset($element['interrupted']))
|
||||
{
|
||||
if ($line[0] === ' ')
|
||||
if ($line[0] === ' ' and ! preg_match('/^[ ]{0,4}\[(.+?)\]:[ ]*([^ ]+)/', $line))
|
||||
{
|
||||
$element['lines'] []= '';
|
||||
|
||||
@ -692,4 +692,4 @@ class Parsedown
|
||||
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user