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:
parent
fce4633ff9
commit
2618509cc6
@ -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[]
|
||||
|
Loading…
Reference in New Issue
Block a user