Skip to content

Commit 2c67b53

Browse files
authored
Merge pull request #217 from wivaku/patch-1
check if filename has extension
2 parents c054128 + 9802b0d commit 2c67b53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Exports/Concerns/WithFilename.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ abstract protected function getDefaultExtension(): string;
2727

2828
protected function ensureFilenameHasExtension(string $filename): string
2929
{
30-
return Str::contains($filename, '.')
30+
return Str::of($filename)->test('/\.\w{3,4}$/')
3131
? $filename
3232
: $filename.'.'.$this->getDefaultExtension();
3333
}

0 commit comments

Comments
 (0)