diff --git a/tests/Feature/InternalComponentsTest.php b/tests/Feature/InternalComponentsTest.php index 8b8c48d5..9a8da0ce 100644 --- a/tests/Feature/InternalComponentsTest.php +++ b/tests/Feature/InternalComponentsTest.php @@ -26,8 +26,10 @@ it('refers to its own components through its namespace, which no prefix or app c ->filter(fn (SplFileInfo $file): bool => str_ends_with($file->getFilename(), '.blade.php')) ->flatMap(function (SplFileInfo $file) use ($names): array { // Comments document usage as an application writes it, and the showcase's examples - // are that usage; neither is compiled as the package's own markup. - $source = preg_replace(['/\{\{--.*?--\}\}/s', "/<<<'BLADE'.*?^\\s*BLADE,/sm"], '', $file->getContents()); + // are that usage; neither is compiled as the package's own markup. An example heredoc + // ends `BLADE,` as an array's value (most sections) or `BLADE;` assigned to its own + // variable (a Layout page with a single example of its own, plan step 38). + $source = preg_replace(['/\{\{--.*?--\}\}/s', "/<<<'BLADE'.*?^\\s*BLADE[,;]/sm"], '', $file->getContents()); preg_match_all('/<\/?x-('.$names.')(?=[\s\/>])/', $source, $matches);