mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Merge pull request #4903 from rxu/ticket/15323
[ticket/15323] Allow Twig syntax in bbcode.html
This commit is contained in:
@@ -521,7 +521,9 @@ class factory implements \phpbb\textformatter\cache_interface
|
||||
protected function extract_templates($template)
|
||||
{
|
||||
// Capture the template fragments
|
||||
preg_match_all('#<!-- BEGIN (.*?) -->(.*?)<!-- END .*? -->#s', $template, $matches, PREG_SET_ORDER);
|
||||
// Allow either phpBB template or the Twig syntax
|
||||
preg_match_all('#<!-- BEGIN (.*?) -->(.*?)<!-- END .*? -->#s', $template, $matches, PREG_SET_ORDER) ?:
|
||||
preg_match_all('#{% for (.*?) in .*? %}(.*?){% endfor %}#s', $template, $matches, PREG_SET_ORDER);
|
||||
|
||||
$fragments = array();
|
||||
foreach ($matches as $match)
|
||||
|
Reference in New Issue
Block a user