mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
More keyword fixes for pre-PHP7
This commit is contained in:
parent
2618509cc6
commit
5e7fb61879
@ -104,7 +104,7 @@ final class BlockTypes implements Configurable
|
||||
* @param string $marker
|
||||
* @return class-string<Block>[]
|
||||
*/
|
||||
public function for($marker)
|
||||
public function get($marker)
|
||||
{
|
||||
if (isset($this->blockTypes[$marker])) {
|
||||
return $this->blockTypes[$marker];
|
||||
|
@ -63,7 +63,7 @@ final class InlineTypes implements Configurable
|
||||
* @param string $marker
|
||||
* @return class-string<Inline>[]
|
||||
*/
|
||||
public function for($marker)
|
||||
public function get($marker)
|
||||
{
|
||||
if (isset($this->inlineTypes[$marker])) {
|
||||
return $this->inlineTypes[$marker];
|
||||
|
@ -104,7 +104,7 @@ final class Parsedown
|
||||
|
||||
$potentialBlockTypes = \array_merge(
|
||||
$this->State->get(BlockTypes::class)->unmarked(),
|
||||
$this->State->get(BlockTypes::class)->for($marker)
|
||||
$this->State->get(BlockTypes::class)->get($marker)
|
||||
);
|
||||
|
||||
foreach ($potentialBlockTypes as $blockType) {
|
||||
@ -186,7 +186,7 @@ final class Parsedown
|
||||
) {
|
||||
$marker = \substr($Excerpt->text(), 0, 1);
|
||||
|
||||
foreach ($InlineTypes->for($marker) as $inlineType) {
|
||||
foreach ($InlineTypes->get($marker) as $inlineType) {
|
||||
# check to see if the current inline type is nestable in the current context
|
||||
|
||||
$Inline = $inlineType::build($Excerpt, $this->State);
|
||||
|
Loading…
Reference in New Issue
Block a user