Skip to content

Commit 749375c

Browse files
committed
Fix fly.io issue
1 parent fe2b0dd commit 749375c

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

src/Manager.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ public function postProcessBlocks($blocks)
149149

150150
public function processFileContents($file)
151151
{
152+
if (Str::startsWith($file, '##LARAVEL_TRIM_FIXER##')) {
153+
return false;
154+
}
155+
152156
$directories = $this->config('snippet_directories', []);
153157

154158
// Add a blank path to account for absolute paths.

tests/MiddlewareAndComponentTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,18 @@ public function code_contents_can_be_a_file_2()
239239
});
240240
}
241241

242+
/** @test */
243+
public function file_must_be_passed_via_contents()
244+
{
245+
$this->fakeNullResponse('component');
246+
247+
$this->getView('file-must-be-passed-through-contents.blade.php');
248+
249+
Http::assertSent(function ($request) {
250+
return $request['blocks'][0]['code'] === config_path('app.php');
251+
});
252+
}
253+
242254
/** @test */
243255
public function dedent_works_properly()
244256
{
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<x-torchlight-code torchlight-id='component' language='php'>
2+
{{ config_path("app.php") }}
3+
</x-torchlight-code>

0 commit comments

Comments
 (0)