mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/twig] Fix begin loop var regex
PHPBB3-11598
This commit is contained in:
parent
52bce2ce11
commit
9652483ef4
1 changed files with 2 additions and 2 deletions
|
@ -134,10 +134,10 @@ class phpbb_template_twig_lexer extends Twig_Lexer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all parent nodes, e.g. foo, bar from foo.bar.foobar
|
// Remove all parent nodes, e.g. foo, bar from foo.bar.foobar.VAR
|
||||||
foreach ($parent_nodes as $node)
|
foreach ($parent_nodes as $node)
|
||||||
{
|
{
|
||||||
$body = preg_replace('#([^a-zA-Z0-9])' . $node . '\.#', '$1', $body);
|
$body = preg_replace('#([^a-zA-Z0-9_])' . $node . '\.([a-zA-Z0-9_]+)\.#', '$1$2.', $body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add current node to list of parent nodes for child nodes
|
// Add current node to list of parent nodes for child nodes
|
||||||
|
|
Loading…
Add table
Reference in a new issue