JavaScript: Enhance `DEFINE_RE` to broaden supported syntaxes
This commit is contained in:
parent
b17be671bc
commit
4a2ab4740c
|
@ -12,7 +12,8 @@ use JShrink\Minifier;
|
|||
class JavaScript
|
||||
{
|
||||
/** @var string */
|
||||
const DEFINE_RE = '/(?<!\.)define\(\s*([\'"][^\'"]*[\'"])?[,\s]*(\[[^]]*\])?[,\s]*(function\s*\([^)]*\)|[^=]*=>)/';
|
||||
const DEFINE_RE =
|
||||
'/(?<!\.)define\(\s*([\'"][^\'"]*[\'"])?[,\s]*(\[[^]]*\])?[,\s]*((?>function\s*\([^)]*\)|[^=]*=>|\w+).*)/';
|
||||
|
||||
protected static $jsFiles = [
|
||||
'js/helpers.js',
|
||||
|
|
Loading…
Reference in New Issue