Skip to content

Commit

Permalink
Fix fly.io issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondfrancis committed Aug 18, 2023
1 parent fe2b0dd commit 749375c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ public function postProcessBlocks($blocks)

public function processFileContents($file)
{
if (Str::startsWith($file, '##LARAVEL_TRIM_FIXER##')) {
return false;
}

$directories = $this->config('snippet_directories', []);

// Add a blank path to account for absolute paths.
Expand Down
12 changes: 12 additions & 0 deletions tests/MiddlewareAndComponentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,18 @@ public function code_contents_can_be_a_file_2()
});
}

/** @test */
public function file_must_be_passed_via_contents()
{
$this->fakeNullResponse('component');

$this->getView('file-must-be-passed-through-contents.blade.php');

Http::assertSent(function ($request) {
return $request['blocks'][0]['code'] === config_path('app.php');
});
}

/** @test */
public function dedent_works_properly()
{
Expand Down
3 changes: 3 additions & 0 deletions tests/Support/file-must-be-passed-through-contents.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<x-torchlight-code torchlight-id='component' language='php'>
{{ config_path("app.php") }}
</x-torchlight-code>

0 comments on commit 749375c

Please sign in to comment.