Contextual limits on indentation stripping

This commit is contained in:
Aidan Woods 2016-10-11 13:38:47 +01:00 committed by GitHub
parent c4d4a6800d
commit 06c4344a71
1 changed files with 2 additions and 3 deletions

View File

@ -585,7 +585,6 @@ class Parsedown
}
elseif ($Block['indent'] === $Line['indent'])
{
echo $Block['data']['rootItem'] ."\t" . $Block['indent'] ."\t" . $Block['data']['type'] ."\t" . $Line['indent'] . "\t". $Block['data']['matchText'] ."\t" .$Line['text'] . "\n";
return null;
}
@ -596,7 +595,7 @@ class Parsedown
if ( ! isset($Block['interrupted']))
{
$text = preg_replace('/^[ ]{0,4}/', '', $Line['body']);
$text = preg_replace('/^[ ]{0,'.($Block['indent'] + 1).'}/', '', $Line['body']);
$Block['li']['text'] []= $text;
@ -607,7 +606,7 @@ class Parsedown
{
$Block['li']['text'] []= '';
$text = preg_replace('/^[ ]{0,4}/', '', $Line['body']);
$text = preg_replace('/^[ ]{0,'.($Block['indent'] + 1).'}/', '', $Line['body']);
$Block['li']['text'] []= $text;