mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/11701] Fix regex for appending |length
PHPBB3-11701
This commit is contained in:
parent
c0b9db1c62
commit
2d764ef7d5
1 changed files with 2 additions and 2 deletions
|
@ -226,10 +226,10 @@ class phpbb_template_twig_lexer extends Twig_Lexer
|
||||||
$inner = preg_replace('#\s\$([a-zA-Z_0-9]+)#', ' definition.$1', $inner);
|
$inner = preg_replace('#\s\$([a-zA-Z_0-9]+)#', ' definition.$1', $inner);
|
||||||
|
|
||||||
// Replace .foo with loops.foo|length
|
// Replace .foo with loops.foo|length
|
||||||
$inner = preg_replace('#\s\.([a-zA-Z_0-9]+)#', ' loops.$1|length', $inner);
|
$inner = preg_replace('#\s\.([a-zA-Z_0-9]+) #', ' loops.$1|length ', $inner);
|
||||||
|
|
||||||
// Replace .foo.bar with foo.bar|length
|
// Replace .foo.bar with foo.bar|length
|
||||||
$inner = preg_replace('#\s\.([a-zA-Z_0-9\.]+)#', ' $1|length', $inner);
|
$inner = preg_replace('#\s\.([a-zA-Z_0-9\.]+) #', ' $1|length ', $inner);
|
||||||
|
|
||||||
return "<!-- {$matches[1]}IF{$inner}-->";
|
return "<!-- {$matches[1]}IF{$inner}-->";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue