1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Now the class is a bit shorter we can remove these makeshift dividers

This commit is contained in:
Aidan Woods 2019-01-25 19:52:52 +00:00
parent fce4633ff9
commit 2618509cc6
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

View File

@ -100,20 +100,13 @@ final class Parsedown
}
}
# ~
$marker = $Line->text()[0];
# ~
$potentialBlockTypes = \array_merge(
$this->State->get(BlockTypes::class)->unmarked(),
$this->State->get(BlockTypes::class)->for($marker)
);
#
# ~
foreach ($potentialBlockTypes as $blockType) {
$Block = $blockType::build($Context, $CurrentBlock, $this->State);
@ -134,8 +127,6 @@ final class Parsedown
}
}
# ~
if (isset($CurrentBlock) and $CurrentBlock instanceof Paragraph) {
$Block = $CurrentBlock->advance($Context);
}
@ -151,21 +142,13 @@ final class Parsedown
}
}
# ~
if (isset($CurrentBlock)) {
$Blocks[] = $CurrentBlock;
}
# ~
return $Blocks;
}
#
# ~
#
/**
* @param string $text
* @return StateRenderable[]