Commit 1017f22c authored by Emanuil Rusev's avatar Emanuil Rusev
Browse files

fix paragraph list

parent 88854955
......@@ -324,8 +324,6 @@ class Parsedown
if ($element['type'] === 'paragraph' and isset($element['interrupted']) === false)
{
$is_heading = true;
$chopped_line = rtrim($line);
$i = 1;
......@@ -334,19 +332,14 @@ class Parsedown
{
if ($chopped_line[$i] !== $line[0])
{
$is_heading = false;
break;
break 2;
}
$i++;
}
if ($is_heading)
{
$element['type'] = 'heading';
$element['level'] = $line[0] === '-' ? 2 : 1;
}
$element['type'] = 'heading';
$element['level'] = $line[0] === '-' ? 2 : 1;
continue 2;
}
......
<p>paragraph</p>
<ul>
<li>li</li>
<li>li</li>
</ul>
<p>paragraph</p>
<ul>
<li>
<p>li</p>
</li>
<li>li</li>
</ul>
\ No newline at end of file
paragraph
- li
- li
paragraph
* li
* li
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment