Skip to content

Commit

Permalink
Cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 8, 2024
1 parent 801d9de commit 4fd21b6
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,11 @@ public static function postprocess(string $html): string
protected static function processFilepathLine(array $lines, int $index, bool $highlightedByTorchlight): array
{
$path = static::trimHydeDirective($lines[$index]);
$label = static::resolveTemplate($path, $highlightedByTorchlight);
$codeBlockLine = $index + 1;

unset($lines[$index]);

$codeBlockLine = $index + 1;
$label = static::resolveTemplate($path, $highlightedByTorchlight);

$lines[$codeBlockLine] = static::injectLabel($label, $lines[$codeBlockLine], $highlightedByTorchlight);

return $lines;
Expand Down

0 comments on commit 4fd21b6

Please sign in to comment.