extensions = $extensions; } public function __invoke(): CommonMarkConverter { $converter = new CommonMarkConverter(); foreach ($this->extensions as $extension) { $converter->getEnvironment()->addExtension($extension); } return $converter; } }