mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix variable escaping for LESS
This commit is contained in:
parent
01315e62aa
commit
1650b79a99
1 changed files with 6 additions and 0 deletions
|
|
@ -271,6 +271,12 @@ class FrontEndFileHandler extends Handler
|
|||
{
|
||||
$file->vars = array_merge($file->vars, $default_font_config);
|
||||
}
|
||||
if ($file->fileExtension === 'less')
|
||||
{
|
||||
$file->vars = array_map(function($str) {
|
||||
return preg_match('/^[0-9a-zA-Z\.%_-]+$/', $str) ? $str : ('~"' . str_replace('"', '\\"', $str) . '"');
|
||||
}, $file->vars);
|
||||
}
|
||||
|
||||
$compiledFileName = $file->fileName . ($minify ? '.min' : '') . '.css';
|
||||
$compiledFileHash = sha1($file->fileRealPath . ':' . serialize($file->vars));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue