We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to use this style delimiters
$smarty->left_delimiter = '{^'; $smarty->right_delimiter = '^}';
$smarty->left_delimiter = '{^';
$smarty->right_delimiter = '^}';
This will produce the following exception Line 357 at file: smarty\libs\sysplugins\smarty_internal_templatelexer.php
Line 357 at file: smarty\libs\sysplugins\smarty_internal_templatelexer.php
I am positive everything was working fine at 3.1.31
I try to solve the problem, so I edited the function initDelimiterPreg in smarty_internal_templatecompilerbase.php
/** * Build lexer regular expressions for left and right delimiter and user defined literals */ public function initDelimiterPreg() { $ldel = $this->smarty->getLeftDelimiter(); $this->ldelLength = strlen($ldel); $this->ldelPreg = ''; foreach (str_split($ldel, 1) as $chr) { $chr = preg_quote($chr, '/'); $this->ldelPreg .= '[' . ($chr === '\\' ? '\\' : '') . $chr . ']'; } $rdel = $this->smarty->getRightDelimiter(); $this->rdelLength = strlen($rdel); $this->rdelPreg = ''; foreach (str_split($rdel, 1) as $chr) { $chr = preg_quote($chr, '/'); $this->rdelPreg .= '[' . ($chr === '\\' ? '\\' : '') . $chr . ']'; } $literals = $this->smarty->getLiterals(); if (!empty($literals)) { foreach ($literals as $key => $literal) { $literalPreg = ''; foreach (str_split($literal, 1) as $chr) { $literalPreg .= '[' . ($chr === '\\' ? '\\' : '') . $chr . ']'; } $literals[ $key ] = $literalPreg; } $this->literalPreg = '|' . implode('|', $literals); } else { $this->literalPreg = ''; } }
The text was updated successfully, but these errors were encountered:
Make pull request #482
Sorry, something went wrong.
added test - bugfix some custom left and right delimiters like '{^' '…
ec11f61
…^}' did not work smarty-php/smarty#450 smarty-php/smarty#482
- bugfix some custom left and right delimiters like '{^' '^}' did not…
2c60503
… work #450 #482
e250f28
…^}' did not work #450 #482
No branches or pull requests
I want to use this style delimiters
$smarty->left_delimiter = '{^';
$smarty->right_delimiter = '^}';
This will produce the following exception
Line 357 at file: smarty\libs\sysplugins\smarty_internal_templatelexer.php
I am positive everything was working fine at 3.1.31
I try to solve the problem, so I edited the function initDelimiterPreg in smarty_internal_templatecompilerbase.php
The text was updated successfully, but these errors were encountered: