Skip to content

Commit

Permalink
fix: do not bind transformer to tin, pass theme directly
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdorn committed Oct 4, 2022
1 parent 9992af1 commit ae2b4e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tin.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ public function process(string $code, callable $transformer): string
return array_reduce(
array_keys($highlighted),
function (string $_, int|string $line) use ($transformer, $highlighted) {
$line = $transformer(...)->call(
$this,
$line = $transformer(
(int)$line,
$highlighted[(int)$line],
count($highlighted),
$this->theme
);

return $line !== null ? $_ . $line : $_;
Expand Down

0 comments on commit ae2b4e1

Please sign in to comment.