Skip to content

Commit df210bb

Browse files
committed
Swap array_key_exists params
1 parent 35fb624 commit df210bb

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/TorchlightExtension.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@ public function register(ConfigurableEnvironmentInterface $environment)
2424
// to gather up all the code blocks and send off our requests.
2525
$environment->addEventListener(DocumentParsedEvent::class, [$this, 'onDocumentParsed']);
2626

27-
2827
// After the document is parsed, it's rendered. We register our
2928
// renderers with a higher priority than the default ones,
3029
// and we'll fetch the blocks straight from the cache.
3130
$environment->addBlockRenderer(FencedCode::class, $this, 10);
3231
$environment->addBlockRenderer(IndentedCode::class, $this, 10);
33-
3432
}
3533

3634
/**
@@ -66,7 +64,7 @@ public function render(AbstractBlock $block, ElementRendererInterface $htmlRende
6664
{
6765
$hash = $this->makeTorchlightBlock($block)->hash();
6866

69-
if (array_key_exists(static::$torchlightBlocks, $hash)) {
67+
if (array_key_exists($hash, static::$torchlightBlocks)) {
7068
return static::$torchlightBlocks[$hash]->html;
7169
}
7270
}

0 commit comments

Comments
 (0)