Skip to content

Commit

Permalink
Merge pull request #16 from Stillat/improve-volt-compatibility
Browse files Browse the repository at this point in the history
Improves compatibility with Volt
  • Loading branch information
JohnathonKoster authored Jan 28, 2025
2 parents 4b0961a + 4536d31 commit d7875cb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Compiler/TemplateCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,8 @@ protected function compileNodes(array $nodes): string
$compiledComponentTemplate = Str::swap($swapVars, $compiledComponentTemplate);
$compiledComponentTemplate = $this->compileExceptions($compiledComponentTemplate);

$compiled .= $compiledComponentTemplate;
$compiled .= $this->storeComponentBlock($compiledComponentTemplate);

$this->stopCompilingComponent();
}

Expand Down
5 changes: 5 additions & 0 deletions src/Runtime/ViewManifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Stillat\Dagger\Runtime;

use Illuminate\Contracts\View\View;
use Illuminate\Support\Str;

class ViewManifest
{
Expand Down Expand Up @@ -121,6 +122,10 @@ public function getRootStoragePaths(): array

public function getStoragePath(string $rootView): string
{
$rootView = Str::swap([
':' => '_',
], $rootView);

return $this->cachePath."_compiler_manifest_{$rootView}.json";
}

Expand Down
2 changes: 0 additions & 2 deletions tests/Compiler/AttributeForwardingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,12 @@
The First Button
The Second Button
The Third Button
No Title
Component B Button Two
Expand Down
2 changes: 0 additions & 2 deletions tests/Compiler/DynamicComponentsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,12 @@
The First Button
The Second Button
The Third Button
No Title
Component B Button Two
Expand Down

0 comments on commit d7875cb

Please sign in to comment.