diff --git a/src/BladeXCompiler.php b/src/BladeXCompiler.php index cadbca3..da55bda 100644 --- a/src/BladeXCompiler.php +++ b/src/BladeXCompiler.php @@ -18,11 +18,11 @@ public function compile(string $viewContents): string { return array_reduce( $this->bladeX->getRegisteredComponents(), - [$this, 'replaceBladeXComponentWithRegularBladeComponent'], + [$this, 'parseComponentHtml'], $viewContents); } - protected function replaceBladeXComponentWithRegularBladeComponent(string $viewContents, BladeXComponent $bladeXComponent) + protected function parseComponentHtml(string $viewContents, BladeXComponent $bladeXComponent) { $pattern = "/<\s*{$bladeXComponent->name}[^>]*>((.|\n)*?)<\s*\/\s*{$bladeXComponent->name}>/m";