Skip to content

Commit

Permalink
Add normalizing the template path before exploding it
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubtobiasz committed Feb 7, 2024
1 parent 7d0ab09 commit f2dd5d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function generate(string $input, string ...$parts): string

private function normalizeTemplatePath(string $templatePath): string
{
$parts = explode('/', $templatePath);
$parts = explode('/', str_replace('\\', '/', $templatePath));
$resultParts = [];

foreach ($parts as $part) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function itGeneratesNameDataProvider(): array
['@SyliusShop/_template.html.twig', ['header'], 'sylius_shop.template.header'],
['@SyliusShop/_template.html.twig', ['header', 'hamburger_menu'], 'sylius_shop.template.header.hamburger_menu'],
['@SyliusShop/_template.html.twig', ['header', 'hamburgerMenu'], 'sylius_shop.template.header.hamburger_menu'],
['@SyliusAdmin\Shared\Crud/update.html.twig', [], 'sylius_admin.shared.crud.update']
];
}

Expand Down

0 comments on commit f2dd5d5

Please sign in to comment.