1
0
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:
Nathan Guse 2013-09-13 06:43:40 -07:00
commit 16c6e43914
3 changed files with 8 additions and 2 deletions

View File

@ -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',

View File

@ -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',

View File

@ -1,2 +1,8 @@
<!-- DEFINE $DEF = '{VARIABLE}' -->
<!-- INCLUDE {$DEF} -->
<!-- DEFINE $DEF_WITH_UNDERSCORES = '{VARIABLE}' -->
<!-- INCLUDE {$DEF_WITH_UNDERSCORES} -->
<!-- DEFINE $DEF123 = '{VARIABLE}' -->
<!-- INCLUDE {$DEF123} -->