diff --git a/src/KzykHys/Pygments/Pygments.php b/src/KzykHys/Pygments/Pygments.php index 6ebd652..1938cf9 100644 --- a/src/KzykHys/Pygments/Pygments.php +++ b/src/KzykHys/Pygments/Pygments.php @@ -53,13 +53,9 @@ public function highlight($code, $lexer = null, $formatter = null, $options = ar } if (count($options)) { - $arg = array(); - foreach ($options as $key => $value) { - $arg[] = sprintf('%s=%s', $key, $value); + $builder->add('-P')->add(sprintf('%s=%s', $key, $value)); } - - $builder->add('-O')->add(implode(',', $arg)); } $process = $builder->getProcess()->setStdin($code); @@ -197,4 +193,4 @@ protected function parseList($input) return $list; } -} \ No newline at end of file +}