mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
Improve regexp for template filters
This commit is contained in:
parent
c4c5fa9e0d
commit
f338d38538
1 changed files with 2 additions and 2 deletions
|
|
@ -565,10 +565,10 @@ class TemplateHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
// Separate filters from variable.
|
// Separate filters from variable.
|
||||||
if (preg_match('@^(.+?)(?<![|\s])\\|([a-z].+)$@', $m[1], $mm))
|
if (preg_match('@^(.+?)(?<![|\s])((?:\|[a-z]{2}[a-z0-9_]+(?::.+)?)+)$@', $m[1], $mm))
|
||||||
{
|
{
|
||||||
$m[1] = $mm[1];
|
$m[1] = $mm[1];
|
||||||
$filters = array_map('trim', explode_with_escape('|', $mm[2]));
|
$filters = array_map('trim', explode_with_escape('|', substr($mm[2], 1)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue