mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Sort custom namespaces from longest to shortest before compiling regexp
This commit is contained in:
parent
48e0f55d6b
commit
cd0779862e
1 changed files with 1 additions and 0 deletions
|
|
@ -1485,6 +1485,7 @@ class ModuleController extends Module
|
|||
}
|
||||
if (count($regexp))
|
||||
{
|
||||
usort($regexp, function($a, $b) { return strlen($b) - strlen($a); });
|
||||
$namespaces['regexp'] = '!^(' . implode('|', $regexp) . ')/(\\w+/)*(\\w+)$!';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue