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:
kaamaru 2013-11-16 22:20:00 +00:00
parent 38300323a6
commit fdf75e8b5b

View File

@ -182,7 +182,7 @@ class Parsedown
if (isset($element['interrupted']))
{
if ($line[0] === ' ')
if ($line[0] === ' ' and ! preg_match('/^[ ]{0,4}\[(.+?)\]:[ ]*([^ ]+)/', $line))
{
$element['lines'] []= '';