adjust regex due to StyleCI spacing change

This commit is contained in:
El RIDO 2024-07-09 21:51:19 +02:00
parent e051cde317
commit 118c919663
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92

View File

@ -384,12 +384,11 @@ class Helper
$file = PATH . 'lib' . DIRECTORY_SEPARATOR . 'Configuration.php';
$content = preg_replace_callback(
'#\'js/([a-z0-9.-]+.js)\' =\> \'([^\']*)\',#',
'#\'js/([a-z0-9.-]+.js)(\' +)=\> \'[^\']*\',#',
function ($matches) {
if (array_key_exists($matches[1], Helper::$hashes)) {
return '\'js/' . $matches[1] . '\' => \'sha512-' .
Helper::$hashes[$matches[1]] .
'\',';
return '\'js/' . $matches[1] . $matches[2] .
'=> \'sha512-' . Helper::$hashes[$matches[1]] . '\',';
} else {
return $matches[0];
}