1
0
mirror of https://github.com/erusev/parsedown.git synced 2025-09-05 20:33:03 +02:00

Compare commits

..

2 Commits

Author SHA1 Message Date
Emanuil Rusev
2a5f99547c resolve #162 2014-05-01 01:05:31 +03:00
Emanuil Rusev
e373391e7d resolve #164 2014-05-01 00:29:21 +03:00
3 changed files with 36 additions and 5 deletions

View File

@@ -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;
}
#
# ~
#

View File

@@ -0,0 +1,9 @@
<ul>
<li>
<p>li</p>
<ul>
<li>li</li>
<li>li</li>
</ul>
</li>
</ul>

View File

@@ -0,0 +1,4 @@
- li
- li
- li