improve readability

This commit is contained in:
Emanuil Rusev 2014-04-28 02:27:05 +03:00
parent 307a987cb6
commit 83d3e3dbbf
1 changed files with 12 additions and 21 deletions

View File

@ -111,30 +111,21 @@ class Parsedown
foreach ($lines as $line) foreach ($lines as $line)
{ {
if (chop($line) === '')
{
if (isset($CurrentBlock))
{
$CurrentBlock['interrupted'] = true;
}
continue;
}
$indent = 0; $indent = 0;
while (true) while (isset($line[$indent]) and $line[$indent] === ' ')
{ {
if (isset($line[$indent])) $indent ++;
{
if ($line[$indent] === ' ')
{
$indent ++;
}
else
{
break;
}
}
else # blank line
{
if (isset($CurrentBlock))
{
$CurrentBlock['interrupted'] = true;
}
continue 2;
}
} }
$text = $indent > 0 ? substr($line, $indent) : $line; $text = $indent > 0 ? substr($line, $indent) : $line;