Merge branch 'rhymix:master' into master

This commit is contained in:
Lastorder 2025-05-14 18:42:06 +09:00 committed by GitHub
commit 0739f82c49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 160 additions and 58 deletions

View file

@ -453,8 +453,8 @@ class Formatter
}
if ($import_type === 'scss')
{
$import_content = preg_replace('!//.*?\n!s', '', $import_content);
$import_content = preg_replace('![\r\n]+!', ' ', $import_content);
$import_content = preg_replace('@(?<!:)//.*?\n@s', '', $import_content);
$import_content = preg_replace('@[\r\n]@', ' ', $import_content);
}
return trim($import_content);
}, $content);

View file

@ -91,7 +91,11 @@ class HTTP
$target_dir = dirname($target_filename);
if (!Storage::isDirectory($target_dir) && !Storage::createDirectory($target_dir))
{
return false;
return new Helpers\HTTPHelper(new Exception('Cannot create directory: ' . $target_dir));
}
if (!Storage::isWritable($target_dir) && (!Storage::exists($target_filename) || !Storage::isWritable($target_filename)))
{
return new Helpers\HTTPHelper(new Exception('No permission to write file: ' . $target_filename));
}
// Pass to request() with appropriate settings for the filename.