mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Compare commits
2 Commits
1.0.0-rc.2
...
1.0.0-rc.3
Author | SHA1 | Date | |
---|---|---|---|
2a5f99547c | |||
e373391e7d |
@ -470,9 +470,18 @@ class Parsedown
|
||||
return $Block;
|
||||
}
|
||||
|
||||
$string = htmlspecialchars($Line['body'], ENT_NOQUOTES, 'UTF-8');
|
||||
$Block['element']['text']['text'] .= "\n".$Line['body'];;
|
||||
|
||||
$Block['element']['text']['text'] .= "\n".$string;;
|
||||
return $Block;
|
||||
}
|
||||
|
||||
protected function completeFencedCode($Block)
|
||||
{
|
||||
$text = $Block['element']['text']['text'];
|
||||
|
||||
$text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8');
|
||||
|
||||
$Block['element']['text']['text'] = $text;
|
||||
|
||||
return $Block;
|
||||
}
|
||||
@ -548,7 +557,7 @@ class Parsedown
|
||||
{
|
||||
$Block['li']['text'] []= '';
|
||||
|
||||
$text = preg_replace('/^[ ]{0,2}/', '', $Line['body']);
|
||||
$text = preg_replace('/^[ ]{0,4}/', '', $Line['body']);
|
||||
|
||||
$Block['li']['text'] []= $text;
|
||||
|
||||
@ -762,7 +771,6 @@ class Parsedown
|
||||
if ($Line['indent'] >= 4)
|
||||
{
|
||||
$text = substr($Line['body'], 4);
|
||||
$text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8');
|
||||
|
||||
$Block = array(
|
||||
'element' => array(
|
||||
@ -793,7 +801,6 @@ class Parsedown
|
||||
$Block['element']['text']['text'] .= "\n";
|
||||
|
||||
$text = substr($Line['body'], 4);
|
||||
$text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8');
|
||||
|
||||
$Block['element']['text']['text'] .= $text;
|
||||
|
||||
@ -801,6 +808,17 @@ class Parsedown
|
||||
}
|
||||
}
|
||||
|
||||
protected function completeCodeBlock($Block)
|
||||
{
|
||||
$text = $Block['element']['text']['text'];
|
||||
|
||||
$text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8');
|
||||
|
||||
$Block['element']['text']['text'] = $text;
|
||||
|
||||
return $Block;
|
||||
}
|
||||
|
||||
#
|
||||
# ~
|
||||
#
|
||||
|
9
test/data/separated_nested_list.html
Normal file
9
test/data/separated_nested_list.html
Normal file
@ -0,0 +1,9 @@
|
||||
<ul>
|
||||
<li>
|
||||
<p>li</p>
|
||||
<ul>
|
||||
<li>li</li>
|
||||
<li>li</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
4
test/data/separated_nested_list.md
Normal file
4
test/data/separated_nested_list.md
Normal file
@ -0,0 +1,4 @@
|
||||
- li
|
||||
|
||||
- li
|
||||
- li
|
Reference in New Issue
Block a user