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
|
* @param string $marker
|
||||||
* @return class-string<Block>[]
|
* @return class-string<Block>[]
|
||||||
*/
|
*/
|
||||||
public function for($marker)
|
public function get($marker)
|
||||||
{
|
{
|
||||||
if (isset($this->blockTypes[$marker])) {
|
if (isset($this->blockTypes[$marker])) {
|
||||||
return $this->blockTypes[$marker];
|
return $this->blockTypes[$marker];
|
||||||
|
@ -63,7 +63,7 @@ final class InlineTypes implements Configurable
|
|||||||
* @param string $marker
|
* @param string $marker
|
||||||
* @return class-string<Inline>[]
|
* @return class-string<Inline>[]
|
||||||
*/
|
*/
|
||||||
public function for($marker)
|
public function get($marker)
|
||||||
{
|
{
|
||||||
if (isset($this->inlineTypes[$marker])) {
|
if (isset($this->inlineTypes[$marker])) {
|
||||||
return $this->inlineTypes[$marker];
|
return $this->inlineTypes[$marker];
|
||||||
|
@ -104,7 +104,7 @@ final class Parsedown
|
|||||||
|
|
||||||
$potentialBlockTypes = \array_merge(
|
$potentialBlockTypes = \array_merge(
|
||||||
$this->State->get(BlockTypes::class)->unmarked(),
|
$this->State->get(BlockTypes::class)->unmarked(),
|
||||||
$this->State->get(BlockTypes::class)->for($marker)
|
$this->State->get(BlockTypes::class)->get($marker)
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($potentialBlockTypes as $blockType) {
|
foreach ($potentialBlockTypes as $blockType) {
|
||||||
@ -186,7 +186,7 @@ final class Parsedown
|
|||||||
) {
|
) {
|
||||||
$marker = \substr($Excerpt->text(), 0, 1);
|
$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
|
# check to see if the current inline type is nestable in the current context
|
||||||
|
|
||||||
$Inline = $inlineType::build($Excerpt, $this->State);
|
$Inline = $inlineType::build($Excerpt, $this->State);
|
||||||
|
Loading…
Reference in New Issue
Block a user