mirror of
https://github.com/erusev/parsedown.git
synced 2024-09-20 03:51:29 +02:00
Fix code formatting
This commit is contained in:
parent
7b1529fff0
commit
a9e1163c85
@ -507,11 +507,15 @@ class Parsedown
|
|||||||
if (preg_match('/^('.$pattern.'([ ]+|$))(.*)/', $Line['text'], $matches))
|
if (preg_match('/^('.$pattern.'([ ]+|$))(.*)/', $Line['text'], $matches))
|
||||||
{
|
{
|
||||||
$contentIndent = strlen($matches[2]);
|
$contentIndent = strlen($matches[2]);
|
||||||
if ($contentIndent >= 5) {
|
|
||||||
|
if ($contentIndent >= 5)
|
||||||
|
{
|
||||||
$contentIndent -= 1;
|
$contentIndent -= 1;
|
||||||
$matches[1] = substr($matches[1], 0, -$contentIndent);
|
$matches[1] = substr($matches[1], 0, -$contentIndent);
|
||||||
$matches[3] = str_repeat(' ', $contentIndent) . $matches[3];
|
$matches[3] = str_repeat(' ', $contentIndent) . $matches[3];
|
||||||
} elseif ($contentIndent === 0) {
|
}
|
||||||
|
elseif ($contentIndent === 0)
|
||||||
|
{
|
||||||
$matches[1] .= ' ';
|
$matches[1] .= ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -553,7 +557,8 @@ class Parsedown
|
|||||||
|
|
||||||
protected function blockListContinue($Line, array $Block)
|
protected function blockListContinue($Line, array $Block)
|
||||||
{
|
{
|
||||||
if (isset($Block['interrupted']) and empty($Block['li']['text'])) {
|
if (isset($Block['interrupted']) and empty($Block['li']['text']))
|
||||||
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user