From 1111cc3af9f8d980f48b6998a2691bd8d7dd40be Mon Sep 17 00:00:00 2001 From: gwleuverink Date: Fri, 16 Aug 2024 11:55:15 +0200 Subject: [PATCH] refactor --- src/InjectAssets.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/InjectAssets.php b/src/InjectAssets.php index c9c6dde..4b0ad7a 100644 --- a/src/InjectAssets.php +++ b/src/InjectAssets.php @@ -49,18 +49,18 @@ public function __invoke(RequestHandled $handled) } /** Injects assets into given html string (taken from Livewire's injection mechanism) */ - protected function injectAssets(string $html, string $core): string + protected function injectAssets(string $html, string $assets): string { $html = str($html); if ($html->test('/<\s*\/\s*head\s*>/i')) { return $html - ->replaceMatches('/(<\s*\\s*head\s*>)/i', '$1' . $core) + ->replaceMatches('/(<\s*\\s*head\s*>)/i', '$1' . $assets) ->toString(); } return $html - ->replaceMatches('/(<\s*html(?:\s[^>])*>)/i', '$1' . $core) + ->replaceMatches('/(<\s*html(?:\s[^>])*>)/i', '$1' . $assets) ->toString(); } }