mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-10 17:45:18 +02:00
Merge pull request #1709 from rechosen/ticket/11843
[ticket/11843] Make the twig lexer fix DEFINE variables with underscores again
This commit is contained in:
commit
16c6e43914
@ -75,7 +75,7 @@ class phpbb_template_twig_lexer extends Twig_Lexer
|
||||
|
||||
// Fix tokens that may have inline variables (e.g. <!-- DEFINE $TEST = '{FOO}')
|
||||
$code = $this->fix_inline_variable_tokens(array(
|
||||
'DEFINE \$[a-zA-Z0-9]+ =',
|
||||
'DEFINE \$[a-zA-Z0-9_]+ =',
|
||||
'INCLUDE',
|
||||
'INCLUDEPHP',
|
||||
'INCLUDEJS',
|
||||
|
@ -237,7 +237,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
|
||||
array('VARIABLE' => 'variable.html'),
|
||||
array(),
|
||||
array(),
|
||||
'variable.html',
|
||||
"variable.html\nvariable.html\nvariable.html",
|
||||
),
|
||||
array(
|
||||
'include_loop_define.html',
|
||||
|
@ -1,2 +1,8 @@
|
||||
<!-- DEFINE $DEF = '{VARIABLE}' -->
|
||||
<!-- INCLUDE {$DEF} -->
|
||||
|
||||
<!-- DEFINE $DEF_WITH_UNDERSCORES = '{VARIABLE}' -->
|
||||
<!-- INCLUDE {$DEF_WITH_UNDERSCORES} -->
|
||||
|
||||
<!-- DEFINE $DEF123 = '{VARIABLE}' -->
|
||||
<!-- INCLUDE {$DEF123} -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user